mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-07 11:54:26 +02:00
fix spl_autoload when autoloaders exist
This commit is contained in:
@@ -87,12 +87,13 @@ define('SMARTY_PHP_ALLOW', 3); //-> escape tags as entities
|
|||||||
/**
|
/**
|
||||||
* register the class autoloader
|
* register the class autoloader
|
||||||
*/
|
*/
|
||||||
|
spl_autoload_extensions('.php,.inc');
|
||||||
if (set_include_path(SMARTY_SYSPLUGINS_DIR . PATH_SEPARATOR . get_include_path()) !== false) {
|
if (set_include_path(SMARTY_SYSPLUGINS_DIR . PATH_SEPARATOR . get_include_path()) !== false) {
|
||||||
spl_autoload_extensions('.php,.inc');
|
$spl_funcs = spl_autoload_functions();
|
||||||
$registeredAutoLoadFunctions = spl_autoload_functions();
|
if($spl_funcs === false)
|
||||||
if (!isset($registeredAutoLoadFunctions['spl_autoload'])) {
|
spl_autoload_register();
|
||||||
spl_autoload_register();
|
elseif(!in_array('spl_autoload',$spl_funcs))
|
||||||
}
|
spl_autoload_register('spl_autoload');
|
||||||
} else {
|
} else {
|
||||||
spl_autoload_register('smartyAutoload');
|
spl_autoload_register('smartyAutoload');
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user