Magento Memory Leak v1.4.1.1 (The Array of Death)


/ Published in: PHP
Save to your folder(s)

This fixes the way Magento imports data as it just keeps adding ‘straight join’ to the array which uses a lot of memory if your importing a lot of products and will kill the import.

Replace this function in /lib/Varien/Db/Select.php

This has been fixed in the next update and a discussion can be seen here...

http://www.magentocommerce.com/boards/viewthread/113901/


Copy this code and paste it in your HTML
  1. public function __construct(Zend_Db_Adapter_Abstract $adapter)
  2. {
  3. parent::__construct($adapter);
  4. if (!in_array(self::STRAIGHT_JOIN_ON, self::$_joinTypes)) {
  5. self::$_joinTypes[] = self::STRAIGHT_JOIN_ON;
  6. self::$_partsInit = array(self::STRAIGHT_JOIN => false) + self::$_partsInit;
  7. }
  8. }

URL: http://blog.ewtechnologies.com/magento-2/magento-memory-leak-1-4-1-1/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.