Fill in missing params from a dieUsage
[lhc/web/wiklou.git] / includes / Cdb.php
index e7c2c00..a65462f 100644 (file)
@@ -1,4 +1,9 @@
 <?php
+/**
+ * Native CDB file reader and writer
+ *
+ * @file
+ */
 
 /**
  * Read from a CDB file.
@@ -98,7 +103,8 @@ class CdbReader_DBA {
        }
 
        function close() {
-               dba_close( $this->handle );
+               if( isset($this->handle) )
+                       dba_close( $this->handle );
                unset( $this->handle );
        }
 
@@ -128,7 +134,8 @@ class CdbWriter_DBA {
        }
 
        function close() {
-               dba_close( $this->handle );
+               if( isset($this->handle) )
+                       dba_close( $this->handle );
                if ( wfIsWindows() ) {
                        unlink( $this->realFileName );
                }