Skip to content
Permalink
Browse files

don't use __autoload if greater than 7.2.0

  • Loading branch information
johnpipi committed Nov 25, 2019
1 parent 668e27b commit 858c3001f58ff4e5147cada1532dd0b69d88309f
Showing with 6 additions and 3 deletions.
  1. +6 −3 trax/vendor/trax/trax.php
@@ -243,9 +243,12 @@ public static function register_autoload() {
###################################################################
# Auto include model / controller / other app specific libs files
###################################################################
if(!function_exists('spl_autoload_register')) {
function __autoload($class_name) {
trax_autoload($class_name);
if(version_compare(PHP_VERSION, '7.2.0') < 0) {
// __autoload is now depricated (https://www.php.net/manual/en/function.autoload.php)
if(!function_exists('spl_autoload_register')) {
function __autoload($class_name) {
trax_autoload($class_name);
}
}
}
function trax_autoload($class_name) {

0 comments on commit 858c300

Please sign in to comment.
You can’t perform that action at this time.