From 6dd212d5be3d154062155431d592ec49d3cf26d3 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Thu, 13 Aug 2009 21:18:37 +0000 Subject: [PATCH] Follow-up r54966: more sanity checks --- includes/Cdb.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/Cdb.php b/includes/Cdb.php index e7c2c00b8a..ab429872d1 100644 --- a/includes/Cdb.php +++ b/includes/Cdb.php @@ -98,7 +98,8 @@ class CdbReader_DBA { } function close() { - dba_close( $this->handle ); + if( isset($this->handle) ) + dba_close( $this->handle ); unset( $this->handle ); } @@ -128,7 +129,8 @@ class CdbWriter_DBA { } function close() { - dba_close( $this->handle ); + if( isset($this->handle) ) + dba_close( $this->handle ); if ( wfIsWindows() ) { unlink( $this->realFileName ); } -- 2.20.1