[php-src] Issue #22369: wrong path succeeds in stream_context_set_options

From: Date: Sat, 20 Jun 2026 10:55:17 +0000
Subject: [php-src] Issue #22369: wrong path succeeds in stream_context_set_options
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-252219@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/22369 Author: Playit3110 ### Description After Initiating a TCP-Server I wanted to enable TLS encryption with the following code: ```php $socket = stream_socket_server("tcp://0.0.0.0:8000", $errno, $errstr); $options = [ 'ssl' => [ 'local_cert' => '/not/a/real/path/to/file.cert', 'local_pk' => '/not/a/real/path/to/file.key', ], ]; echo stream_context_set_options($socket, $options); ``` After execution stream_context_set_options return true, even if the files for encrypting connections is missing ### PHP Version ```plain PHP 8.4.21 (cli) (built: May 7 2026 18:46:27) (NTS) Copyright (c) The PHP Group Built by Debian Zend Engine v4.4.21, Copyright (c) Zend Technologies with Zend OPcache v8.4.21, Copyright (c), by Zend Technologies ``` ### Operating System Debian 13 Trixie

« previous php.bugs (#252219) next »