Skip to content

PHP7 compatibility #17

@jglauche

Description

@jglauche

Hi,
I am running magento (very slightly fixed) in php7.

This problem arises when uploading images:

Uncaught Error: Function name must be a string in /var/www/shop/lib/Varien/File/Uploader.php:274

I thought it would be an easy fix by changing that line to
$params['object']->{$params['method']($this->_file['tmp_name'])};

But that would result in this error:

Uncaught Error: Call to undefined function validateUploadFile() in /var/www/shop/lib/Varien/File/Uploader.php:274

I believe it's looking at a wrong namespace. It wouldn't find it if I added a validateUploadFile function to that class.
I commented the line and it magically works.

Will there be a proper fix for that?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions