Magento requires PHP 5.4+!

Some of our customers keep stumbling upon serious issue. It’s an impossibility to edit or view orders in store backend. Analyzing root cause of the problem we’ve identified this in the following file /app/code/core/Mage/Adminhtml/Helper/Sales.php
This file was changed over Magento release. You can see the difference between the previous and current versions on screenshot below. Please notice, only the problematic part of the code is displayed.

public function escapeHtmlWithLinks($data, $allowedTags = null)
-if (is_string($data) && is_array($allowedTags) && in_array('a', $allowedTags)) {
-$links = array();
+if (!empty($data) && is_array($allowedTags) && in_array('a', $allowedTags)) {
+$links = [];
 . . .
 . . .
 . . .

First thing you should mention before updating to Magento is to check with your hosting provider if PHP version is 5.4 or higher.

Leave a Reply

Back to top