Skip to content

Commit 4f11fa2

Browse files
committed
ext/pcntl: Use standard wording for ValueError
1 parent b164b59 commit 4f11fa2

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

ext/pcntl/pcntl.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -1693,8 +1693,9 @@ PHP_FUNCTION(pcntl_setcpuaffinity)
16931693
Z_PARAM_ARRAY(hmask)
16941694
ZEND_PARSE_PARAMETERS_END();
16951695

1696+
// TODO Why are the arguments optional?
16961697
if (!hmask || zend_hash_num_elements(Z_ARRVAL_P(hmask)) == 0) {
1697-
zend_argument_value_error(2, "must not be empty");
1698+
zend_argument_cannot_be_empty_error(2);
16981699
RETURN_THROWS();
16991700
}
17001701

ext/pcntl/tests/pcntl_cpuaffinity.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ array(0) {
6060
array(0) {
6161
}
6262
bool(true)
63-
pcntl_setcpuaffinity(): Argument #2 ($cpu_ids) must not be empty
63+
pcntl_setcpuaffinity(): Argument #2 ($cpu_ids) cannot be empty
6464
pcntl_setcpuaffinity(): Argument #2 ($cpu_ids) cpu id invalid value (def)
6565
pcntl_setcpuaffinity(): Argument #2 ($cpu_ids) cpu id must be between 0 and %d (%d)
6666
pcntl_setcpuaffinity(): Argument #2 ($cpu_ids) cpu id must be between 0 and %d (-1024)

0 commit comments

Comments
 (0)