After running without any issues suddenly getting two error messages at top of all pages. Any idea as to cause and solution please?
Warning: Invalid argument supplied for foreach() in /home/rhovan/public_html/gallery/zp-core/controller.php on line 41
Warning: Cannot modify header information - headers already sent by (output started at /home/rhovan/public_html/gallery/zp-core/controller.php:41) in /home/rhovan/public_html/gallery/index.php on line 12
Comments
What is likely to be needed to get the gallery going again please.
Currently it reads:
`if (getOption('Use_Captcha')) {
$d = getOption('last_captcha_purge');
$expire = time() - 86400;
if ($d > $expire) {
chdir(SERVERCACHE . "/");
$filelist = glob('code_*.png');
foreach ($filelist as $file) {
$file = SERVERCACHE . "/" . $file;
if (filemtime($file) < $expire) {
unlink($file);
}
}
}
setOption('last_captcha_purge', time());
}`
It needs to say:
`if (getOption('Use_Captcha')) {
$d = getOption('last_captcha_purge');
$expire = time() - 86400;
if ($d > $expire) {
chdir(SERVERCACHE . "/");
$filelist = glob('code_*.png');
if ($filelist) {
foreach ($filelist as $file) {
$file = SERVERCACHE . "/" . $file;
if (filemtime($file) < $expire) {
unlink($file);
}
}
}
}
setOption('last_captcha_purge', time());
}`