* @todo document
* @ingroup Maintenance
*/
+use \Cdb\Exception as CdbException;
+use \Cdb\Reader as CdbReader;
/** */
require_once __DIR__ . '/commandLine.inc';
$bad = false;
$showhelp = false;
$quit = false;
- static $fileHandle;
+ static $fileHandle = false;
$line = Maintenance::readconsole();
if ( $line === false ) {
print "Loading cdb file $file...";
try {
$fileHandle = CdbReader::open( $file );
- } catch( CdbException $e ) {}
+ } catch ( CdbException $e ) {
+ }
if ( !$fileHandle ) {
print "not a cdb file or unable to read it\n";
$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";