fix handling empty line output

This commit is contained in:
Robin Appelman 2016-04-26 14:39:17 +02:00
commit fdb83ce72f

View file

@ -58,7 +58,7 @@ class Connection extends RawConnection {
}
}
$length = mb_strlen(self::DELIMITER);
while (mb_substr($line, 0, $length) !== self::DELIMITER && $line) { //next prompt functions as delimiter
while (mb_substr($line, 0, $length) !== self::DELIMITER && $line !== false) { //next prompt functions as delimiter
if (is_callable($callback)) {
$result = $callback($line);
if ($result === false) { // allow the callback to close the connection for infinite running commands