OSDN Git Service

Warning: fread() [function.fread]: Length parameter must be greater than 0
authorhenoheno <henoheno>
Sun, 2 Sep 2007 14:24:40 +0000 (23:24 +0900)
committerumorigu <umorigu@gmail.com>
Sun, 30 Nov 2014 01:12:08 +0000 (10:12 +0900)
lib/file.php

index 9472efa..54023be 100644 (file)
@@ -39,6 +39,8 @@ function get_source($page = NULL, $lock = TRUE, $join = FALSE)
                        $size = filesize($path);
                        if ($size === FALSE) {
                                $result = FALSE;
+                       } else if ($size == 0) {
+                               $result = '';
                        } else {
                                $result = fread($fp, $size);
                                if ($result !== FALSE) {