mirror of
https://github.com/mbirth/tcl_update_db.git
synced 2024-11-09 23:06:45 +00:00
Fix autoloading in PHP 7.0.
This commit is contained in:
parent
c62c036905
commit
2fe04b0edd
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once 'lib/autoloader.php';
|
require_once __DIR__ . '/lib/autoloader.php';
|
||||||
|
|
||||||
use \TclUpdates\XmlParser;
|
use \TclUpdates\XmlParser;
|
||||||
|
|
||||||
|
0
lib/TclUpdates/XmlParser.php
Executable file → Normal file
0
lib/TclUpdates/XmlParser.php
Executable file → Normal file
9
lib/autoloader.php
Executable file → Normal file
9
lib/autoloader.php
Executable file → Normal file
@ -2,5 +2,10 @@
|
|||||||
|
|
||||||
set_include_path(__DIR__ . PATH_SEPARATOR . get_include_path());
|
set_include_path(__DIR__ . PATH_SEPARATOR . get_include_path());
|
||||||
|
|
||||||
// PSR-4
|
function simpleAutoloader($class)
|
||||||
spl_autoload_register();
|
{
|
||||||
|
require_once __DIR__ . DIRECTORY_SEPARATOR . str_replace('\\', DIRECTORY_SEPARATOR, $class) . '.php';
|
||||||
|
}
|
||||||
|
|
||||||
|
// PHP 7.0's default autoloader seems to have problems with PSR-4
|
||||||
|
spl_autoload_register('simpleAutoloader');
|
||||||
|
Loading…
Reference in New Issue
Block a user