From 0480b3d679d8450f2e4f97e2fbda2ca3857a0d70 Mon Sep 17 00:00:00 2001 From: lamentxu <1372449351@qq.com> Date: Thu, 9 Apr 2026 17:32:00 +0800 Subject: [PATCH] refactor --- ext/session/session.c | 2 +- ext/soap/soap.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/session/session.c b/ext/session/session.c index 51ab3922e0bdf..5094e7412a88e 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 59e2bd4168052..75d88cd541589 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; }