After installing the SUPEE-10570 security patch for Magento CE 1.9.2.4, it can happen that the shopping cart displays only a blank page, without any errors appearing in the server logs or Magento logs. And this only occurs when compilation is enabled. Finding the error without any logs is relatively difficult—but after a long search, we were able to identify the culprit. In this case, it was a function in /app/code/core/Mage/Customer/Helper/Data.php, namely getPasswordTimestamp().
The crash occurs when an attempt is made to load a Customer object using the Magento methods provided for this purpose. Whether via Mage::getModel('customer/customer') or Mage::getSingleton('customer/session'), all that ever appears is a blank page without any error output whatsoever—even in developer mode with the most sensitive error levels enabled. So, we retrieve the required information manually without going through the Customer object, regardless of whether it has already been initialized or not.
As always: No core changes, i.e. we copy the aforementioned function to
/app/code/local/Mage/Customer/Helper/Data.php
Here, we first integrate a query
$resource = Mage::getSingleton('core/resource'); $resource = Mage::getSingleton('core/resource');
$readConnection = $resource->getConnection('core_read');
$query = 'SELECT * FROM ' . $resource->getTableName('customer_entity').' WHERE `entity_id` = '.$customerId; $results = $readConnection->fetchAll($query);
, which now provides us with the data of the currently logged-in user. However, we are only interested in the "created_at" column, so we assign it in the appropriate format and return it to the requesting location:
$result=$results[0]; $result=$results[0];
$date_created = Varien_Date::toTimestamp($result['created_at']);
return $date_created;
Why the patched functions do not work seamlessly together may remain a mystery to us. Until then, however, this workaround works perfectly. Tested with Magento CE 1.9.2.4.
