Skip to content

Commit 99b00c7

Browse files
committed
Fix : ValueError: fread(): Argument FriendsOfSymfony1#2 ($length) must be greater than 0
1 parent f35d0ef commit 99b00c7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/cache/sfFileCache.class.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,9 @@ protected function read($path, $type = self::READ_DATA)
256256
fseek($fp, 0, SEEK_END);
257257
$length = ftell($fp) - 24;
258258
fseek($fp, 24);
259+
if($length < 0) {
260+
$length = 0;
261+
}
259262
$data[self::READ_DATA] = @fread($fp, $length);
260263
}
261264
}

0 commit comments

Comments
 (0)