#49953 [Opn->Bgs]: stream_context_create() expects at most 1 parameter
| From: | rquadling@php.net | Date: | Thu, 22 Oct 2009 15:58:30 +0000 |
| Subject: | #49953 [Opn->Bgs]: stream_context_create() expects at most 1 parameter | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-2992@lists.php.net to get a copy of this message | ||
ID: 49953
Updated by: rquadling@php.net
Reported By: zlobnygrif at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: Documentation problem
Operating System: FreeBSD
PHP Version: 5.2.11
New Comment:
The params option to stream_context_create() was added in PHP 5.3.0.
Previous Comments:
------------------------------------------------------------------------
[2009-10-22 10:17:05] zlobnygrif at gmail dot com
Fix:
$ctx = stream_context_create();
stream_context_set_params($ctx, array("notification" =>
"stream_notification_callback"));
------------------------------------------------------------------------
[2009-10-22 10:10:20] zlobnygrif at gmail dot com
Description:
------------
Incorrect description
Reproduce code:
---------------
---
From manual page: function.stream-context-create#Description
From manual page: function.stream-notification-callback.php#Examples
---
$ctx = stream_context_create(null, array("notification" =>
"stream_notification_callback"));
Expected result:
----------------
Warning: stream_context_create() expects at most 1 parameter, 2 given
in ...
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=49953&edit=1