Currently an empty string is used to unset the location. Once
again, it makes more sense to use a null value for this purpose
(though the special behavior of empty strings is retained).
The code comment above the function also explicitly indicates
that null should be accepted, and the function does return null
rather than an empty string for the old location value (if it
is missing).
zval *tmp;
zval *this_ptr = ZEND_THIS;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "|s", &location, &location_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "|s!", &location, &location_len) == FAILURE) {
RETURN_THROWS();
}
public function __setSoapHeaders($headers = null) {}
/** @return string|null */
- public function __setLocation(string $location = "") {}
+ public function __setLocation(?string $location = null) {}
}