0

In Magento 1.9.3.x..we have upgrade php version from 5.6 to 7.3.after that we are facing issue like

Deprecated: __autoload() is deprecated, use spl_autoload_register() instead in app/code/core/Mage/Core/functions.php on line 61 . function look like below

function __autoload($class) {

if (defined('COMPILER_INCLUDE_PATH')) {
    $classFile = $class.'.php';
} else {
    $classFile = uc_words($class, DIRECTORY_SEPARATOR).'.php';
}

include($classFile);

}

we have replace with

function spl_autoload_register($class) {

if (defined('COMPILER_INCLUDE_PATH')) {
    $classFile = $class.'.php';
} else {
    $classFile = uc_words($class, DIRECTORY_SEPARATOR).'.php';
}

include($classFile);

}

But again it throws an fetal error like Fatal error: Cannot redeclare spl_autoload_register() in app/code/core/Mage/Core/functions.php on line 71

Please help me...my live site is not working because of this upgradation..

1 Answer 1

0

"Deprecated" means removed in a further version or shouldn't be used in favor of another method. So no, these mehtods have not to be removed yet.

You can try this in index.php to supress errors:

error_reporting(E_ALL ^ E_DEPRECATED);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.