kolber / stacey

Cheap & easy content management
http://staceyapp.com
MIT License
1.04k stars 131 forks source link

Cache php issue #128

Closed kariemil closed 10 years ago

kariemil commented 10 years ago

After updating a page, the index is now displaying:

Warning: Invalid argument supplied for foreach() in /var/www/virtual/kaffivagninn.is/htdocs/app/cache.inc.php on line 36

at the top.

Line 36 of cache.inc.php says:

foreach($old_caches as $file) unlink($file);

I don't see the problem.

kariemil commented 10 years ago

It went away on its own, so it's probably not a huge issue but it might still be worth checking into?

Sija commented 10 years ago

$old_caches was not an array, thus the warning.

On 06 Oct 2014, at 16:04, Kári Emil Helgason notifications@github.com wrote:

After updating a page, the index is now displaying:

Warning: Invalid argument supplied for foreach() in /var/www/virtual/kaffivagninn.is/htdocs/app/cache.inc.php on line 36

at the top.

Line 36 of cache.inc.php says:

foreach($old_caches as $file) unlink($file); I don't see the problem.

— Reply to this email directly or view it on GitHub.

mjau-mjau commented 10 years ago

If someone has this problem again and wants it fixed indefinitely, substitute the following code on line 36 of cache.inc.php: foreach($old_caches as $file) unlink($file); to: foreach((array)$old_caches as $file) unlink($file);