diff options
author | Andrew Dolgov <[email protected]> | 2017-05-28 19:46:06 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2017-05-28 19:46:06 +0300 |
commit | 34a61a0c3c3d660145a11a9fd0aa3b517dc86180 (patch) | |
tree | 690801bcb2f10b2bb39510d3d851725e3a9b25be | |
parent | 647d91fabf8e85f7acec3d8c410228e8447aa26a (diff) | |
parent | 9b8bec700a0597dcaee2886786ebec69c85d8f5f (diff) |
Merge branch 'autoload_replacement' into 'master'
Replace '__autoload' (deprecated in PHP 7.2) with 'spl_autoload_register'.
See merge request !54
-rw-r--r-- | include/autoload.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/autoload.php b/include/autoload.php index 28a2effd4..3ab998b75 100644 --- a/include/autoload.php +++ b/include/autoload.php @@ -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 + }); |