mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-03 17:24:07 +02:00
fix handling empty line output
This commit is contained in:
parent
45d3ee449f
commit
fdb83ce72f
1 changed files with 1 additions and 1 deletions
|
|
@ -58,7 +58,7 @@ class Connection extends RawConnection {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$length = mb_strlen(self::DELIMITER);
|
$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)) {
|
if (is_callable($callback)) {
|
||||||
$result = $callback($line);
|
$result = $callback($line);
|
||||||
if ($result === false) { // allow the callback to close the connection for infinite running commands
|
if ($result === false) { // allow the callback to close the connection for infinite running commands
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue