Magento Forum

   
Description Edit Error ‘Argument…must be an array, null given..’
 
alexpeterson
Jr. Member
 
Avatar
Total Posts:  11
Joined:  2008-04-14
London
 

I’m unable to update the Description field for some products.

Here is the error that is logged in the system.log file -

2012-09-09T09:07:49+00:00 ERR (3): Recoverable ErrorArgument 1 passed to Varien_Object::addData() must be an array, null givencalled in /home/vzoradmin/subdomains/shop/httpdocs/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php on line 507 and defined  in /home/vzoradmin/subdomains/shop/httpdocs/lib/Varien/Object.php on line 189
2012
-09-09T09:07:49+00:00 ERR (3): WarningInvalid argument supplied for foreach()  in /home/vzoradmin/subdomains/shop/httpdocs/lib/Varien/Object.php on line 191

Line 507 of ProductController.php is…

$product->addData($productData);

Line 189-195 of Object.php is....

public function addData(array $arr)
    
{
        
foreach($arr as $index=>$value{
            $this
->setData($index$value);
        
}
        
return $this;
    
}

What does this mean? Any help would be GREATLY appreciated as I’ve spent 6+ hours looking into this!!

Thanks!

Alex

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top