Index: trunk/extensions/FlaggedRevs/specialpages/RatingHistory_body.php |
— | — | @@ -473,12 +473,12 @@ |
474 | 474 | $plot->generateSVG( "xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'" ); |
475 | 475 | // Write to file for cache |
476 | 476 | $svgPath = $this->getFilePath( $tag, 'svg' ); |
477 | | - $fp = @fopen( $svgPath, 'w' ); |
478 | | - @fwrite( $fp, $plot->svg ); |
| 477 | + $svgHandler = new SvgHandler(); |
| 478 | + if( !@file_put_contents( $svgPath, $plot->svg ) ) { |
| 479 | + return false; |
| 480 | + } |
479 | 481 | // Rasterize due to IE suckage |
480 | | - $svgHandler = new SvgHandler(); |
481 | 482 | $status = $svgHandler->rasterize( $svgPath, $filePath, 1000, 410 ); |
482 | | - @fclose( $fp ); |
483 | 483 | if( $status !== true ) { |
484 | 484 | return false; |
485 | 485 | } |