@@ 76-78 (lines=3) @@ | ||
73 | ||
74 | $out = null; |
|
75 | if ($length === null) { |
|
76 | if (($out = @fread($this->stream, 1)) === false) { |
|
77 | throw new IOException("Failed to read stream."); |
|
78 | } |
|
79 | } else { |
|
80 | if (!is_int($length)) { |
|
81 | throw new InvalidArgumentException("Stream read must be a numeric value."); |
|
@@ 86-88 (lines=3) @@ | ||
83 | // ポインタ位置が負になった場合、警告が出てfalseを返す |
|
84 | // ポインタの終端を越えた場合、読み込みを終了する |
|
85 | // すでに終端位置の場合、空文字を返す |
|
86 | if (($out = @fread($this->stream, $length)) === false) { |
|
87 | throw new IOException("Failed to read stream."); |
|
88 | } |
|
89 | } |
|
90 | ||
91 | return $out; |