From: <var...@us...> - 2014-11-17 14:54:16
|
Revision: 9317 http://sourceforge.net/p/phpwiki/code/9317 Author: vargenau Date: 2014-11-17 14:54:11 +0000 (Mon, 17 Nov 2014) Log Message: ----------- Add this Modified Paths: -------------- trunk/lib/fortune.php Modified: trunk/lib/fortune.php =================================================================== --- trunk/lib/fortune.php 2014-11-17 14:51:47 UTC (rev 9316) +++ trunk/lib/fortune.php 2014-11-17 14:54:11 UTC (rev 9317) @@ -68,12 +68,12 @@ { if (is_file($file) == false) { echo "Input must be a file!<br/>"; - return; + return ''; } if (($fd = fopen($file, "rb")) == false) { echo "Cannot open $file<br/>"; - return; + return ''; } fseek($fd, 24 + 4 * $index); @@ -129,8 +129,9 @@ fseek($fd, 24, SEEK_SET); $i = 0; + $res = array(); while (feof($fd) == FALSE) { - $res[$i] = readLong($fd); + $res[$i] = $this->readLong($fd); $i++; } return $res; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |