Skip to content

Commit e7181e9

Browse files
stoffabpot
authored andcommitted
[Console] Fixed the compatibility with HHVM
1 parent 11b19bf commit e7181e9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Application.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,8 @@ public function renderException($e, $output)
728728
do {
729729
$title = sprintf(' [%s] ', get_class($e));
730730
$len = $strlen($title);
731-
$width = $this->getTerminalWidth() ? $this->getTerminalWidth() - 1 : PHP_INT_MAX;
731+
// HHVM only accepts 32 bits integer in str_split, even when PHP_INT_MAX is a 64 bit integer: https://github.com/facebook/hhvm/issues/1327
732+
$width = $this->getTerminalWidth() ? $this->getTerminalWidth() - 1 : (defined('HHVM_VERSION') ? 1 << 31 : PHP_INT_MAX);
732733
$formatter = $output->getFormatter();
733734
$lines = array();
734735
foreach (preg_split('/\r?\n/', $e->getMessage()) as $line) {

0 commit comments

Comments
 (0)