mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
tree: use zend_str_has_nul_byte() API (#19336)
This commit is contained in:
parent
2c4d4a6f18
commit
105c1e9896
10 changed files with 20 additions and 25 deletions
|
@ -609,7 +609,7 @@ PHP_METHOD(XSLTProcessor, setParameter)
|
|||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
if (UNEXPECTED(CHECK_NULL_PATH(ZSTR_VAL(string_key), ZSTR_LEN(string_key)))) {
|
||||
if (UNEXPECTED(zend_str_has_nul_byte(string_key))) {
|
||||
zend_argument_value_error(3, "must not contain keys with any null bytes");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
@ -625,7 +625,7 @@ PHP_METHOD(XSLTProcessor, setParameter)
|
|||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
if (UNEXPECTED(CHECK_NULL_PATH(ZSTR_VAL(str), ZSTR_LEN(str)))) {
|
||||
if (UNEXPECTED(zend_str_has_nul_byte(str))) {
|
||||
zend_string_release(str);
|
||||
zend_string_release_ex(ht_key, false);
|
||||
zend_argument_value_error(3, "must not contain values with any null bytes");
|
||||
|
@ -643,7 +643,7 @@ PHP_METHOD(XSLTProcessor, setParameter)
|
|||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
if (UNEXPECTED(CHECK_NULL_PATH(ZSTR_VAL(name), ZSTR_LEN(name)))) {
|
||||
if (UNEXPECTED(zend_str_has_nul_byte(name))) {
|
||||
zend_argument_value_error(2, "must not contain any null bytes");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue