[php-src] master: ext/readline: Remove redundant SAPI name length check

From: Date: Sun, 11 Oct 2026 06:46:05 +0000
Subject: [php-src] master: ext/readline: Remove redundant SAPI name length check
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-142178@lists.php.net to get a copy of this message
Author: Weilin Du (LamentXU123) Date: 2026-10-11T14:45:51+08:00 Commit: https://github.com/php/php-src/commit/d8a976ed2b321d413aad72f09d968f736f6f1323 Raw diff: https://github.com/php/php-src/commit/d8a976ed2b321d413aad72f09d968f736f6f1323.diff ext/readline: Remove redundant SAPI name length check Changed paths: M ext/readline/readline_cli.c Diff: diff --git a/ext/readline/readline_cli.c b/ext/readline/readline_cli.c index 3f435b82c784..89d378e2d7d7 100644 --- a/ext/readline/readline_cli.c +++ b/ext/readline/readline_cli.c @@ -709,7 +709,7 @@ typedef cli_shell_callbacks_t *(__cdecl *get_cli_shell_callbacks)(void); get_cli_shell_callbacks get_callbacks; \ HMODULE hMod = GetModuleHandle("php.exe"); \ (cb) = NULL; \ - if (strlen(sapi_module.name) >= 3 && 0 == strncmp("cli", sapi_module.name, 3)) { \ + if (0 == strncmp("cli", sapi_module.name, 3)) { \ get_callbacks = (get_cli_shell_callbacks)GetProcAddress(hMod, "php_cli_get_shell_callbacks"); \ if (get_callbacks) { \ (cb) = get_callbacks(); \

« previous php.cvs (#142178) next »