Skip to content

Commit 8ae02c8

Browse files
committed
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4: Avoid modifying the return value of readline_completion_function()
2 parents 34ef804 + 9450893 commit 8ae02c8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ext/readline/readline.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,7 @@ char **php_readline_completion_cb(const char *text, int start, int end)
448448

449449
if (call_user_function(NULL, NULL, &_readline_completion, &_readline_array, 3, params) == SUCCESS) {
450450
if (Z_TYPE(_readline_array) == IS_ARRAY) {
451+
SEPARATE_ARRAY(&_readline_array);
451452
if (zend_hash_num_elements(Z_ARRVAL(_readline_array))) {
452453
matches = rl_completion_matches(text,_readline_command_generator);
453454
} else {

0 commit comments

Comments
 (0)