diff --git a/ext/session/session.c b/ext/session/session.c index 51ab3922e0bd..5094e7412a88 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -641,7 +641,7 @@ static PHP_INI_MH(OnUpdateSaveDir) /* Only do the open_basedir check at runtime */ if (stage == PHP_INI_STAGE_RUNTIME || stage == PHP_INI_STAGE_HTACCESS) { - if (memchr(ZSTR_VAL(new_value), '\0', ZSTR_LEN(new_value)) != NULL) { + if (zend_str_has_nul_byte(new_value)) { return FAILURE; } diff --git a/ext/soap/soap.c b/ext/soap/soap.c index 59e2bd416805..75d88cd54158 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -387,7 +387,7 @@ static PHP_INI_MH(OnUpdateCacheDir) if (stage == PHP_INI_STAGE_RUNTIME || stage == PHP_INI_STAGE_HTACCESS) { char *p; - if (memchr(ZSTR_VAL(new_value), '\0', ZSTR_LEN(new_value)) != NULL) { + if (zend_str_has_nul_byte(new_value)) { return FAILURE; }