Skip to content

Commit 484d528

Browse files
authored
ext/standard: Use usual not empty error for proc_open() (#18083)
1 parent bb265d2 commit 484d528

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ext/standard/proc_open.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1247,8 +1247,8 @@ PHP_FUNCTION(proc_open)
12471247

12481248
if (command_ht) {
12491249
uint32_t num_elems = zend_hash_num_elements(command_ht);
1250-
if (num_elems == 0) {
1251-
zend_argument_value_error(1, "must have at least one element");
1250+
if (UNEXPECTED(num_elems == 0)) {
1251+
zend_argument_must_not_be_empty_error(1);
12521252
RETURN_THROWS();
12531253
}
12541254

ext/standard/tests/general_functions/proc_open_array.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ proc_close($proc);
7676
?>
7777
--EXPECT--
7878
Empty command array:
79-
proc_open(): Argument #1 ($command) must have at least one element
79+
proc_open(): Argument #1 ($command) must not be empty
8080

8181
Nul byte in program name:
8282
Command array element 1 contains a null byte

0 commit comments

Comments
 (0)