Avoid crash in thread.inc.php when running huge expire.
This commit is contained in:
parent
224e58d5ab
commit
c1c56ed528
|
@ -147,7 +147,9 @@ function thread_cache_removearticle($group,$id) {
|
|||
// now lets rebuild the tree...
|
||||
if(isset($value->answers))
|
||||
foreach ($value->answers as $key => $answer) {
|
||||
$thread[$answer]->isAnswer=false;
|
||||
if(isset($thread[$answer])) {
|
||||
$thread[$answer]->isAnswer=false;
|
||||
}
|
||||
}
|
||||
if(isset($value->references))
|
||||
foreach ($value->references as $reference) {
|
||||
|
|
|
@ -76,7 +76,9 @@ file_put_contents($logfile, "\n".format_log_date()." ".$config_name." ".$group."
|
|||
echo "Expiring: ".$break[4]." IN: ".$group." #".$break[0]."\r\n";
|
||||
file_put_contents($logfile, "\n".format_log_date()." ".$config_name." ".$group." Expiring: ".$break[4], FILE_APPEND);
|
||||
// Remove article from tradspool:
|
||||
unlink($spooldir.'/articles/'.$grouppath.'/'.$break[0]);
|
||||
if(is_file($spooldir.'/articles/'.$grouppath.'/'.$break[0])) {
|
||||
unlink($spooldir.'/articles/'.$grouppath.'/'.$break[0]);
|
||||
}
|
||||
thread_cache_removearticle($group,$break[4]);
|
||||
continue;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue