summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/readline/readline.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/readline/readline.c b/ext/readline/readline.c
index ecd5533350..4bd9103462 100644
--- a/ext/readline/readline.c
+++ b/ext/readline/readline.c
@@ -354,6 +354,11 @@ PHP_FUNCTION(readline_clear_history)
return;
}
+#if HAVE_LIBEDIT
+ /* clear_history is the only function where rl_initialize
+ is not call to ensure correct allocation */
+ using_history();
+#endif
clear_history();
RETURN_TRUE;