Magento Backup Error Filesystem.php on line 234 + Solution

If you see this error message when trying to access the backups section of Magento Admin:

Warning: Invalid argument supplied for foreach() in /home/*****/public_html/lib/Varien/Data/Collection/Filesystem.php on line 234

Then this simple fix is for you:

replace (line 24):

foreach (glob($folder . DIRECTORY_SEPARATOR . ‘*’) as $node) {

with this:

foreach ((array)glob($folder . DIRECTORY_SEPARATOR . ‘*’) as $node) {

I saw this here, so all credit to them.


Tags: magentoerrorbackup