summaryrefslogtreecommitdiff
path: root/include/autoload.php
diff options
context:
space:
mode:
authorwn_ <[email protected]>2017-05-27 10:52:16 -0500
committerwn_ <[email protected]>2017-05-27 10:52:16 -0500
commit9b8bec700a0597dcaee2886786ebec69c85d8f5f (patch)
tree9fcf2f34d996b36afb1f95192699745d8b0bdcc4 /include/autoload.php
parente50a64791687c27ba6a76df84a0e3b32dfd77936 (diff)
Replace '__autoload' (deprecated in PHP 7.2) with 'spl_autoload_register'.
http://php.net/manual/en/function.autoload.php http://php.net/spl_autoload_register https://wiki.php.net/rfc/deprecations_php_7_2
Diffstat (limited to 'include/autoload.php')
-rw-r--r--include/autoload.php4
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
+ });