Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ext/pcntl: Fix pcntl_setcpuaffinity exception type for invalid cpu id. #17474

Closed
wants to merge 2 commits into from

Conversation

devnexen
Copy link
Member

found while working on the doc.

Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense to me as a bug fix considering:

  • 8.4 hasn't been release for that long
  • Generally we consider Errors should not be caught
  • It is surprising that a type failure results in a ValueError

@@ -1721,7 +1721,7 @@ PHP_FUNCTION(pcntl_setcpuaffinity)
cpu = (zend_long)tmp;
} else {
zend_string *wcpu = zval_get_string_func(ncpu);
zend_argument_value_error(2, "cpu id invalid type (%s)", ZSTR_VAL(wcpu));
zend_argument_type_error(2, "cpu id invalid type (%s)", ZSTR_VAL(wcpu));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably change the wording to the usual one?

@devnexen devnexen closed this in 6979a7a Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants