Bug #72075 [NEW]: Referencing socket resources breaks stream_select

From: Date: Fri, 22 Apr 2016 09:17:03 +0000
Subject: Bug #72075 [NEW]: Referencing socket resources breaks stream_select
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-200686@lists.php.net to get a copy of this message
From: php at vanviegen dot net Operating system: Debian PHP version: 7.0.5 Package: Streams related Bug Type: Bug Bug description:Referencing socket resources breaks stream_select 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 bug report at https://bugs.php.net/bug.php?id=72075&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=72075&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=72075&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=72075&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=72075&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=72075&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=72075&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=72075&r=needscript Try newer version: https://bugs.php.net/fix.php?id=72075&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=72075&r=support Expected behavior: https://bugs.php.net/fix.php?id=72075&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=72075&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=72075&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=72075&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=72075&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=72075&r=dst IIS Stability: https://bugs.php.net/fix.php?id=72075&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=72075&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=72075&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=72075&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=72075&r=mysqlcfg

« previous php.bugs (#200686) next »