Recently I have upgraded Magento 22.214.171.124 using SUPEE patches to the 126.96.36.199 level, which should be already PHP 7.2 compatible. Magento frontend and backend is running good, but my good old script outside not.
These are some scripts for exporting products to XML feeds, where Magento is being instantiated using traditional aproach like:
require_once $basefolder . 'app/Mage.php'; umask(0); Mage::app(1);
Deprecated: __autoload() is deprecated, use spl_autoload_register() instead in /app/code/core/Mage/Core/functions.php on line 60
Fatal Error Uncaught Mage_Core_Model_Store_Exception in /mnt/data/accounts/f/foltynwine/data/www/foltynwine.cz/app/code/core/Mage/Core/Model/App.php:1377
On PHP 7.1 and 7.0 my scripts are working. Any idea please?
Hello @Open Mage ,
__autoload is generally considered obsolete. It only allows for a single autoloader. Generally you should only use __autoload if you're using a version of PHP without support for spl_autoload_register.
spl_autoload_register allows several autoloaders to be registered which will be run through in turn until a matching class/interface/trait is found and loaded, or until all autoloading options have been exhausted. This means that if you're using framework code or other third party libraries that implement their own autoloaders you don't have to worry about yours causing conflicts.
Can you please try to change __autoload function to spl_autoload_register after clear cache and remove var directory
/app/code/core/Mage/Core/functions.php on line 60
if issue solved, please Accept as Solution & give Kudos
Sorry, I do not want to change anything in core files. Anyway there is a notice from Magento team for the discussed method * @todo change to spl_autoload_register, so I hope it will be resolved in some next M1 version. No problem for now, it is "only depracated".
The main issue for now is the second one mentioned ... FATAL ERROR with Uncaught Mage_Core_Model_Store_Exception. This one breaks the script...