Merge "Remove old workaround for HHVM"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Fri, 13 Oct 2017 19:42:22 +0000 (19:42 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 13 Oct 2017 19:42:22 +0000 (19:42 +0000)
1  2 
maintenance/Maintenance.php

@@@ -1416,32 -1416,6 +1416,32 @@@ abstract class Maintenance 
                return $title;
        }
  
 +      /**
 +       * Count down from $seconds to zero on the terminal, with a one-second pause
 +       * between showing each number. If the maintenance script is in quiet mode,
 +       * this function does nothing.
 +       *
 +       * @since 1.31
 +       *
 +       * @codeCoverageIgnore
 +       * @param int $seconds
 +       */
 +      protected function countDown( $seconds ) {
 +              if ( $this->isQuiet() ) {
 +                      return;
 +              }
 +              for ( $i = $seconds; $i >= 0; $i-- ) {
 +                      if ( $i != $seconds ) {
 +                              $this->output( str_repeat( "\x08", strlen( $i + 1 ) ) );
 +                      }
 +                      $this->output( $i );
 +                      if ( $i ) {
 +                              sleep( 1 );
 +                      }
 +              }
 +              $this->output( "\n" );
 +      }
 +
        /**
         * Wrapper for posix_isatty()
         * We default as considering stdin a tty (for nice readline methods)
                }
  
                if ( $isatty && function_exists( 'readline' ) ) {
-                       $resp = readline( $prompt );
-                       if ( $resp === null ) {
-                               // Workaround for https://github.com/facebook/hhvm/issues/4776
-                               return false;
-                       } else {
-                               return $resp;
-                       }
+                       return readline( $prompt );
                } else {
                        if ( $isatty ) {
                                $st = self::readlineEmulation( $prompt );