Merge "Have SquidUpdate::newFromTitles use getSquidURLs"
[lhc/web/wiklou.git] / tests / phpunit / includes / api / RandomImageGenerator.php
index 6374cfa..e27ba1c 100644 (file)
@@ -256,7 +256,8 @@ class RandomImageGenerator {
                        $shape->addAttribute( 'points', self::shapePointsToString( $drawSpec['shape'] ) );
                }
 
-               if ( !$fh = fopen( $filename, 'w' ) ) {
+               $fh = fopen( $filename, 'w' );
+               if ( !$fh ) {
                        throw new Exception( "couldn't open $filename for writing" );
                }
                fwrite( $fh, $svg->asXML() );