[php-src] master: ext/readline: Remove unreachable branches and useless includes (#24318)

From: Date: Wed, 14 Oct 2026 16:19:49 +0000
Subject: [php-src] master: ext/readline: Remove unreachable branches and useless includes (#24318)
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-142270@lists.php.net to get a copy of this message
Author: Weilin Du (LamentXU123) Committer: GitHub (web-flow) Pusher: LamentXU123 Date: 2026-10-15T00:19:43+08:00 Commit: https://github.com/php/php-src/commit/3952ee06d9ba2206f78da6ffda89c6cb7e62e834 Raw diff: https://github.com/php/php-src/commit/3952ee06d9ba2206f78da6ffda89c6cb7e62e834.diff ext/readline: Remove unreachable branches and useless includes (#24318) Changed paths: M ext/readline/readline.c M ext/readline/readline_cli.c Diff: diff --git a/ext/readline/readline.c b/ext/readline/readline.c index 77a52f251201..828ee6093a09 100644 --- a/ext/readline/readline.c +++ b/ext/readline/readline.c @@ -499,8 +499,6 @@ static void php_rl_callback_handler(char *the_line) zval params[1]; zval dummy; - ZVAL_NULL(&dummy); - _readline_string_zval(&params[0], the_line); call_user_function(NULL, NULL, &_prepped_callback, &dummy, 1, params); diff --git a/ext/readline/readline_cli.c b/ext/readline/readline_cli.c index 89d378e2d7d7..86db1cb91c4d 100644 --- a/ext/readline/readline_cli.c +++ b/ext/readline/readline_cli.c @@ -26,7 +26,6 @@ #include "zend_hash.h" #include "SAPI.h" -#include <locale.h> #include "zend.h" #include "php_ini.h" #include "ext/standard/info.h" @@ -45,7 +44,6 @@ #include "zend_compile.h" #include "zend_execute.h" -#include "zend_highlight.h" #include "zend_exceptions.h" #include "sapi/cli/cli.h" @@ -472,9 +470,7 @@ static char *cli_completion_generator_ht(const char *text, size_t textlen, int * rl_completion_append_character = append_character; return retval; } - if (zend_hash_move_forward(ht) == FAILURE) { - break; - } + zend_hash_move_forward(ht); } (*state)++; return NULL;

« previous php.cvs (#142270) next »