#30028 [Opn->Csd]: stream_get_contents() doesn't respect the $maxlength
| From: | nlopess@php.net | Date: | Thu, 09 Sep 2004 10:54:19 +0000 |
| Subject: | #30028 [Opn->Csd]: stream_get_contents() doesn't respect the $maxlength | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-65954@lists.php.net to get a copy of this message | ||
ID: 30028
Updated by: nlopess@php.net
Reported By: nlopess@php.net
-Status: Open
+Status: Closed
Bug Type: Network related
Operating System: n/a
PHP Version: 5CVS-2004-09-08 (dev)
New Comment:
Fixed by Sara.
Previous Comments:
------------------------------------------------------------------------
[2004-09-08 18:25:55] nlopess@php.net
Description:
------------
It seems that stream_get_contents() isn't respecting the second
paramether, limit.
I think this only happen for http wrappers.
Reproduce code:
---------------
<?
$fp = fopen('http://www.php.net/',
'r');
echo strlen(stream_get_contents($fp, 50));
fclose($fp);
?>
Expected result:
----------------
50
Actual result:
--------------
30094
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=30028&edit=1