-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
In mongodb/mongo-php-driver#1338 for PHPC-2111, handling of optional parameters with zend_parse_parameters (e.g. parse string of "|a!") was replaced with newer macros such as Z_PARAM_ARRAY_OR_NULL; however, many of the corresponding stubs for these methods do not use a nullable type hint and thus PHP prohibits passing a null value at runtime. Attempting to do so results in an fatal error like "Arginfo / zpp mismatch during call of $method".
I believe the relevant fix is to add nullable type hints to those parameters and regenerate the arginfo, but we should also add tests for these methods to ensure that null can be explicitly passed without error.
- is related to
-
PHPC-2111 Replace zend_parse_parameter_calls with PHONGO_PARSE_PARAMETERS macros
- Closed