Magento error - fatal error uncaught error function name must be a string in ...Uploader.php on line 259

If you are experiencing, a similar error to below:

Fatal error: Uncaught Error: Function name must be a string in C:\xampp\htdocs\acf\lib\Varien\File\Uploader.php on line 259 

This happens because in you are running Magneto 1.9 in PHP 7. To solve the error you need to clarify that you are going to call the $callback variable as a method (function).

Navigate to the original line of the code in file:

Lib/Varien/File/Uploader.php

Find the line ~line 259

$params['object']->$params['method']($this->_file['tmp_name']); 

 

And replace it with

$params['object']->{$params['method']}($this->_file['tmp_name']);

 


Print   Email

Related Articles