Bug #74458 [NEW]: stream_socket_get_name returns \0 instead of false
| From: | cpuidle at gmx dot de | Date: | Mon, 17 Apr 2017 10:06:45 +0000 |
| Subject: | Bug #74458 [NEW]: stream_socket_get_name returns \0 instead of false | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-208617@lists.php.net to get a copy of this message | ||
From: cpuidle at gmx dot de
Operating system: OSX
PHP version: 7.1.4
Package: Streams related
Bug Type: Bug
Bug description:stream_socket_get_name returns \0 instead of false
Description:
------------
stream_socket_get_name should return false rather than a \0 string:
<pre class='xdebug-var-dump' dir='ltr'>
<small>/Users/andig/Documents/htdocs/vz/vendor/react/socket/src/Connection.php:44:</small><small>string</small>
<font color='#cc0000'>'�'</font>
<i>(length=1)</i>
</pre>
Test script:
---------------
$address = @stream_socket_get_name($stream, true);
ob_start();
var_dump($address);
$s=ob_get_clean();
error_log($s);
Expected result:
----------------
return false
Actual result:
--------------
return ''.\0.''
--
Edit bug report at https://bugs.php.net/bug.php?id=74458&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=74458&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=74458&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=74458&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=74458&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=74458&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=74458&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=74458&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=74458&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=74458&r=support
Expected behavior: https://bugs.php.net/fix.php?id=74458&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=74458&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=74458&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=74458&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74458&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=74458&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=74458&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=74458&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=74458&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=74458&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=74458&r=mysqlcfg