1

I get this error:

Function name must be a string in  .../lib/Varien/File/Uploader.php:259

,when I try to upload an image. The media directory has been set to writable with chmod -R 777 media . What can be the cause for this?

1 Answer 1

2

SOlved it. The problem was in uniform variable syntax, due to incompatibility between PHP 5 and PHP 7. I changed line 259 in Uploader.php from:

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

to

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

and problem is solved. If someone else wants to give an answer which better explains this, but also mentions my own found issue from this answer, feel free, otherwise I will accept my own answer in day or two (since this is a limitation when accepting one own's answer).

1

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.