* PHP-7.0: Fixed bug #72538 (readline_redisplay crashes php)
@ -626,6 +626,11 @@ PHP_FUNCTION(readline_callback_handler_remove)
Ask readline to redraw the display */
PHP_FUNCTION(readline_redisplay)
{
#if HAVE_LIBEDIT
/* seems libedit doesn't take care of rl_initialize in rl_redisplay
* see bug #72538 */
using_history();
#endif
rl_redisplay();
}
/* }}} */
@ -0,0 +1,15 @@
--TEST--
Bug #72538 (readline_redisplay crashes php)
--SKIPIF--
<?php if (!extension_loaded("readline")) die("skip");
if (READLINE_LIB != "libedit") die("skip libedit only");
?>
--FILE--
<?php
readline_redisplay();
okey
--EXPECT--