Magento backend order view broken (PHP syntax error after SUPEE-7405 : unexpected [ )

Magento backend order view broken (PHP syntax error after SUPEE-7405 : unexpected [ )

Recently I came across an issue after upgrading a client site to Magento CE 1.9.2.3 which includes the recent SUPEE-7405 security patch.

When trying to view the details of an individual order you would get a white page body with no details or data shown. Upon inspecting the source the following error was shown;

<code>
PHP Parse error: syntax error, unexpected ‘[‘ in app/code/core/Mage/Adminhtml/Helper/Sales.php on line 124
</code>

Problem

SUPEE-7405 was coded with PHP 5.4 in mind, older PHP versions are incompatible with the new language constructions used.

Solution

Change line 124 in app/code/core/Mage/Adminhtml/Helper/Sales.php from $links = []; to $links = array();

 

Share this post

Comment (1)

  • Dave Reply

    Hi!! I have this problem with Magento 1.9.2.4, but this fix already exists at this Magento version…

    There is another that I can do?

    10th May 2016 at 4:57 pm

Leave a Reply

Your email address will not be published. Required fields are marked *