From: <var...@us...> - 2014-10-06 12:49:23
|
Revision: 9198 http://sourceforge.net/p/phpwiki/code/9198 Author: vargenau Date: 2014-10-06 12:49:21 +0000 (Mon, 06 Oct 2014) Log Message: ----------- Check file size Modified Paths: -------------- trunk/lib/WikiPluginCached.php Modified: trunk/lib/WikiPluginCached.php =================================================================== --- trunk/lib/WikiPluginCached.php 2014-10-06 12:25:59 UTC (rev 9197) +++ trunk/lib/WikiPluginCached.php 2014-10-06 12:49:21 UTC (rev 9198) @@ -747,7 +747,11 @@ } if (file_exists($tmpfile)) { $fp = fopen($tmpfile, 'rb'); - $content['image'] = fread($fp, filesize($tmpfile)); + if (filesize($tmpfile)) { + $content['image'] = fread($fp, filesize($tmpfile)); + } else { + $content['image'] = ''; + } fclose($fp); if (!empty($this->_static)) { // on static it is in "uploads/" but in wikicached also @@ -756,8 +760,9 @@ return true; } unlink($tmpfile); - if ($content['image']) + if ($content['image']) { return true; + } } return false; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |