]> git.wh0rd.org Git - tt-rss.git/commitdiff
Replace '__autoload' (deprecated in PHP 7.2) with 'spl_autoload_register'.
authorwn_ <invalid@email.com>
Sat, 27 May 2017 15:52:16 +0000 (10:52 -0500)
committerwn_ <invalid@email.com>
Sat, 27 May 2017 15:52:16 +0000 (10:52 -0500)
http://php.net/manual/en/function.autoload.php
http://php.net/spl_autoload_register
https://wiki.php.net/rfc/deprecations_php_7_2

include/autoload.php

index 28a2effd4f4123905ff7ce129489e81f18942f91..3ab998b757237ece278b34b2246696f9033dd759 100644 (file)
@@ -1,7 +1,7 @@
 <?php
        require_once "functions.php";
 
-       function __autoload($class) {
+       spl_autoload_register(function($class) {
                $class_file = str_replace("_", "/", strtolower(basename($class)));
 
                $file = dirname(__FILE__)."/../classes/$class_file.php";
@@ -10,4 +10,4 @@
                        require $file;
                }
 
-       }
\ No newline at end of file
+       });