small fix
authorRené Fritz <r.fritz@colorcube.de>
Thu, 2 Sep 2004 12:47:02 +0000 (12:47 +0000)
committerRené Fritz <r.fritz@colorcube.de>
Thu, 2 Sep 2004 12:47:02 +0000 (12:47 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@452 709f56b5-9817-0410-a4d7-c38de5d9e867

t3lib/class.t3lib_svbase.php

index 170af94..4c827e3 100755 (executable)
@@ -457,7 +457,9 @@ function available()        {
                if ($this->checkInputFile ($absFile)) {
                        if ($fd = fopen ($absFile, 'rb')) {
                                $length = intval($length) ? intval($length) : filesize ($absFile);
-                               $out = fread ($fd, $length);
+                               if ($length > 0) {
+                                       $out = fread ($fd, $length);
+                               }
                                fclose ($fd);
                        } else {
                                $this->errorPush(T3_ERR_SV_FILE_READ, 'Can not read from file: '.$absFile);