From: Tim Starling Date: Thu, 5 Feb 2015 05:07:05 +0000 (+1100) Subject: Workaround for HHVM bug in readline() X-Git-Tag: 1.31.0-rc.0~12477 X-Git-Url: http://git.heureux-cyclage.org/?a=commitdiff_plain;h=97a802407ecc2455e938dc02accd43ebb86204ae;p=lhc%2Fweb%2Fwiklou.git Workaround for HHVM bug in readline() https://github.com/facebook/hhvm/issues/4776 Change-Id: I9d3e6817cee2fa2c11e02989a4b11915f0c708f5 --- diff --git a/maintenance/Maintenance.php b/maintenance/Maintenance.php index 9b98b206a8..af14bb36fc 100644 --- a/maintenance/Maintenance.php +++ b/maintenance/Maintenance.php @@ -1207,7 +1207,13 @@ abstract class Maintenance { } if ( $isatty && function_exists( 'readline' ) ) { - return readline( $prompt ); + $resp = readline( $prompt ); + if ( $resp === null ) { + // Workaround for https://github.com/facebook/hhvm/issues/4776 + return false; + } else { + return $resp; + } } else { if ( $isatty ) { $st = self::readlineEmulation( $prompt );