X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FCdb.php;h=ab429872d1041f408d2b7909b2bc6a5207131a58;hb=5dfc928820613b6e3eeee7e97e60b1af577aa575;hp=20cb7e3e6e8381aa7406cd7b920191d86d1759b3;hpb=d93ea4874e95243e097636579a7be8b5047a0f5f;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Cdb.php b/includes/Cdb.php index 20cb7e3e6e..ab429872d1 100644 --- a/includes/Cdb.php +++ b/includes/Cdb.php @@ -13,7 +13,7 @@ abstract class CdbReader { if ( self::haveExtension() ) { return new CdbReader_DBA( $fileName ); } else { - wfDebug( 'Warning: no dba extension found, using emulation.' ); + wfDebug( "Warning: no dba extension found, using emulation.\n" ); return new CdbReader_PHP( $fileName ); } } @@ -61,7 +61,7 @@ abstract class CdbWriter { if ( CdbReader::haveExtension() ) { return new CdbWriter_DBA( $fileName ); } else { - wfDebug( 'Warning: no dba extension found, using emulation.' ); + wfDebug( "Warning: no dba extension found, using emulation.\n" ); return new CdbWriter_PHP( $fileName ); } } @@ -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 ); }