Skip to content

Commit c581238

Browse files
committed
Merge branch 'PHP-8.0'
* PHP-8.0: Avoid modifying the return value of readline_completion_function()
2 parents 7b2c098 + 8ae02c8 commit c581238

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ext/readline/readline.c

+1
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)