From: Antoine Musso Date: Sun, 22 Apr 2007 20:23:08 +0000 (+0000) Subject: avoid a notice when nothing is found X-Git-Tag: 1.31.0-rc.0~53285 X-Git-Url: https://git.cyclocoop.org/%27.%24link.%27?a=commitdiff_plain;h=fd340c67c4489db575f88a06d9b1c70bc689a45c;p=lhc%2Fweb%2Fwiklou.git avoid a notice when nothing is found --- diff --git a/maintenance/purgeOldText.inc b/maintenance/purgeOldText.inc index 8938cc0d85..c4732e97fa 100644 --- a/maintenance/purgeOldText.inc +++ b/maintenance/purgeOldText.inc @@ -37,6 +37,7 @@ function PurgeRedundantText( $delete = false ) { echo( "Searching for inactive text records..." ); $set = implode( ', ', $cur ); $res = $dbw->query( "SELECT old_id FROM $tbl_txt WHERE old_id NOT IN ( $set )" ); + $old = array(); while( $row = $dbw->fetchObject( $res ) ) { $old[] = $row->old_id; } @@ -59,4 +60,4 @@ function PurgeRedundantText( $delete = false ) { } -?> \ No newline at end of file +?>