r69833 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69832‎ | r69833 | r69834 >
Date:17:00, 24 July 2010
Author:mah
Status:deferred
Tags:
Comment:
Avoid trying to fopen a dir when no filename is returned from getMessageFile()

[24-Jul-2010 16:30:54] PHP Warning: fopen(/home/raymond/export/): failed to open stream: Is a directory in /www/w/extensions/Translate/ffs/Simple.php on line 146
Modified paths:
  • /trunk/extensions/Translate/ffs/Simple.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/ffs/Simple.php
@@ -140,6 +140,9 @@
141141 }
142142
143143 $filename = $this->group->getMessageFile( $code );
 144+ if ( !$filename ) {
 145+ continue;
 146+ }
144147 $target = $targetDirectory . '/' . $filename;
145148
146149 wfMkdirParents( dirname( $target ) );

Status & tagging log