Bug #72075 [Opn->Csd]: Referencing socket resources breaks stream_select
| From: | laruence@php.net | Date: | Sat, 23 Apr 2016 04:22:21 +0000 |
| Subject: | Bug #72075 [Opn->Csd]: Referencing socket resources breaks stream_select | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-200705@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=72075&edit=1
ID: 72075
Updated by: laruence@php.net
Reported by: php at vanviegen dot net
Summary: Referencing socket resources breaks stream_select
-Status: Open
+Status: Closed
Type: Bug
Package: Streams related
Operating System: Debian
PHP Version: 7.0.5
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of laruence@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=9eb7c8cd3b202ff77f1442f5a5d3107bd7fc3a18
Log: Fixed bug #72075 (Referencing socket resources breaks stream_select)
Previous Comments:
------------------------------------------------------------------------
[2016-04-22 09:16:59] php at vanviegen dot net
Description:
------------
Creating references to socket resources causes these resources to no longer work in stream_select.
Test script:
---------------
$r = [stream_socket_server("tcp://127.0.0.1:0", $errno, $errStr)];
$w = NULL;
$e = NULL;
// Without this line, all is well:
$dummy =& $r[0];
print stream_select($r, $w, $e, 3);
Expected result:
----------------
The script should hang for 3s. This is indeed what happens with PHP 5.
Actual result:
--------------
PHP Warning: stream_select(): supplied argument is not a valid stream resource in test.php on line
10
PHP Warning: stream_select(): No stream arrays were passed in test.php on line 10
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=72075&edit=1