[php-src] PR #25719: Fix stream_context_create() rejecting an "options" parameter held by reference

From: Date: Tue, 24 Nov 2026 20:47:57 +0000
Subject: [php-src] PR #25719: Fix stream_context_create() rejecting an "options" parameter held by reference
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-40978@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/25719 Author: lacatoire stream_context_create() and stream_context_set_params() throw a TypeError when the options element of $params is a reference, although it holds a valid array. parse_context_params() checks the type without dereferencing the zval first. ```php <?php $options = ['http' => ['method' => 'HEAD']]; $params = ['options' => &$options]; var_dump(stream_context_create(null, $params)); ``` Before: TypeError: Invalid stream/context parameter After: the context is created with the http options.

« previous php.git-pulls (#40978) next »