r54966 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r54965‎ | r54966 | r54967 >
Date:20:42, 13 August 2009
Author:aaron
Status:resolved (Comments)
Tags:
Comment:
Sanity check $this->handle on close()
Modified paths:
  • /trunk/phase3/includes/Cdb_PHP.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Cdb_PHP.php
@@ -102,7 +102,8 @@
103103 }
104104
105105 function close() {
106 - fclose( $this->handle );
 106+ if( isset($this->handle) )
 107+ fclose( $this->handle );
107108 unset( $this->handle );
108109 }
109110
@@ -251,7 +252,8 @@
252253
253254 public function close() {
254255 $this->finish();
255 - fclose( $this->handle );
 256+ if( isset($this->handle) )
 257+ fclose( $this->handle );
256258 if ( wfIsWindows() && file_exists($this->realFileName) ) {
257259 unlink( $this->realFileName );
258260 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r54971Follow-up r54966: more sanity checksaaron21:18, 13 August 2009

Comments

#Comment by Siebrand (talk | contribs)   21:14, 13 August 2009

Rebuilding lmo... PHP Notice: Undefined property: CdbReader_DBA::$handle in /var/www/w/includes/Cdb.php on line 101 PHP Warning: dba_close(): supplied argument is not a valid DBA identifier resource in /var/www/w/includes/Cdb.php on line 101 PHP Notice: Undefined property: CdbReader_DBA::$handle in /var/www/w/includes/Cdb.php on line 101 PHP Warning: dba_close(): supplied argument is not a valid DBA identifier resource in /var/www/w/includes/Cdb.php on line 101

#Comment by Aaron Schulz (talk | contribs)   21:25, 13 August 2009

Is this still there?

#Comment by Siebrand (talk | contribs)   21:26, 13 August 2009

Yes, I got it on r54970.

#Comment by Siebrand (talk | contribs)   21:27, 13 August 2009

Gone on r54972

Status & tagging log