From: Chad Horohoe Date: Wed, 27 Nov 2013 18:02:34 +0000 (-0800) Subject: Fix notices on undefined $fileHandle and $res X-Git-Tag: 1.31.0-rc.0~17875 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=3628c7b564cd17c556d0be627b5b519327100f6b;p=lhc%2Fweb%2Fwiklou.git Fix notices on undefined $fileHandle and $res Change-Id: If9f37549af85df0a418dbd12a7793e5a45868f61 --- diff --git a/maintenance/cdb.php b/maintenance/cdb.php index bda64f3eab..1772b5f34e 100644 --- a/maintenance/cdb.php +++ b/maintenance/cdb.php @@ -52,7 +52,7 @@ do { $bad = false; $showhelp = false; $quit = false; - static $fileHandle; + static $fileHandle = false; $line = Maintenance::readconsole(); if ( $line === false ) { @@ -98,6 +98,7 @@ do { $res = $fileHandle->get( $args[0] ); } catch ( CdbException $e ) { print "Unable to read key from file\n"; + break; } if ( $res === false ) { print "No such key/value pair\n";