For some reason it blows up under the Editpics section when it hits the $superCage line $superCage->post->getInt('pid'); (this happens when the Edit Files button is pressed off of the index.php). It produces no error message that I can find. I had a log file set up and it logs right before the $supercage and then doesn't execute the following line.
if (defined('EDITPICS_PHP') && !GALLERY_ADMIN_MODE) {
$try_to_delete = false;
//V1.051 Mod following Line
// $pid_array = $_POST['pid'];
$pid_array = $superCage->post->getInt('pid');
foreach($pid_array as $pid){
$pid = (int)$pid;
//V1.051 Mod following line
// if (isset($_POST['delete'.$pid])) $try_to_delete = true;
if ($superCage->post->keyExists('delete'.$pid)) $try_to_delete = true;
}
if ($try_to_delete) {
load_template();
pageheader($lang_error);
cpg_die(ERROR, $lang_errors['perm_denied'], __FILE__, __LINE__);
}
}
Likewise this code to check the boolean condition also causes it to blow up for some reason (placed before the first $superCage).
if ($superCage->post->keyExists('pid')) {
fwrite($newfile,"keyexists");
} else {
fwrite($newfile,"keydoesntexist");
}
write($newfile, "\n");
When I comment out the $superCage section and initialize the $pid_array ($pid_array = array()), everything executes and looks normal, but I am unclear on what the purpose of this section is.