Bug #77938 [NEW]: socket_get_option error

From: Date: Wed, 24 Apr 2019 21:07:43 +0000
Subject: Bug #77938 [NEW]: socket_get_option error
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-220591@lists.php.net to get a copy of this message
From:             v-altruo at microsoft dot com
Operating system: Windows
PHP version:      7.2.18RC1
Package:          Streams related
Bug Type:         Bug
Bug description:socket_get_option error

Description:
------------
Failed regardless of OPCache being enabled or disabled and if it was TS
or NTS.
Test file location:
ext\standard\tests\stream\stream_context_tcp_nodelay_fopen.phpt

Test script:
---------------
$ctxt = stream_context_create([
	"socket" => [
		"tcp_nodelay" => true
	]
]);

$stream = fopen("http://www.php.net",
"r", false,  $ctxt);

$socket =
	@socket_import_stream($stream);

var_dump(socket_get_option($socket, STREAM_IPPROTO_TCP, TCP_NODELAY) >
0);

Expected result:
----------------
bool(true)

Actual result:
--------------
Warning: socket_get_option() expects parameter 1 to be resource, boolean
given in... 
bool(false)

-- 
Edit bug report at https://bugs.php.net/bug.php?id=77938&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=77938&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=77938&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=77938&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=77938&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=77938&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=77938&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=77938&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=77938&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=77938&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=77938&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=77938&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=77938&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=77938&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=77938&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=77938&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=77938&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=77938&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=77938&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=77938&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=77938&r=mysqlcfg



Thread (4 messages)

« previous php.bugs (#220591) next »