From 672703084a8f9826f4156bb5ab38c16fa53a0459 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+ndossche@users.noreply.github.com> Date: Fri, 5 Dec 2025 18:51:42 +0100 Subject: [PATCH] standard: Fix error check for proc_open() command zval_get_string() can never return NULL, you need to use the try version to get NULL. This is observable because the process will still spawn even if an exception had occurred. To fix this, use the try variant. --- ext/standard/proc_open.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/standard/proc_open.c b/ext/standard/proc_open.c index ce77109827740..96e5a4ced9915 100644 --- a/ext/standard/proc_open.c +++ b/ext/standard/proc_open.c @@ -510,7 +510,7 @@ typedef struct _descriptorspec_item { } descriptorspec_item; static zend_string *get_valid_arg_string(zval *zv, int elem_num) { - zend_string *str = zval_get_string(zv); + zend_string *str = zval_try_get_string(zv); if (!str) { return NULL; }