dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3e05275
)
Sanity check $this->handle on close()
author
Aaron Schulz
<aaron@users.mediawiki.org>
Thu, 13 Aug 2009 20:42:19 +0000
(20:42 +0000)
committer
Aaron Schulz
<aaron@users.mediawiki.org>
Thu, 13 Aug 2009 20:42:19 +0000
(20:42 +0000)
includes/Cdb_PHP.php
patch
|
blob
|
history
diff --git
a/includes/Cdb_PHP.php
b/includes/Cdb_PHP.php
index
8f1b30e
..
49294f7
100644
(file)
--- a/
includes/Cdb_PHP.php
+++ b/
includes/Cdb_PHP.php
@@
-102,7
+102,8
@@
class CdbReader_PHP extends CdbReader {
}
function close() {
- fclose( $this->handle );
+ if( isset($this->handle) )
+ fclose( $this->handle );
unset( $this->handle );
}
@@
-251,7
+252,8
@@
class CdbWriter_PHP extends CdbWriter {
public function close() {
$this->finish();
- fclose( $this->handle );
+ if( isset($this->handle) )
+ fclose( $this->handle );
if ( wfIsWindows() && file_exists($this->realFileName) ) {
unlink( $this->realFileName );
}