Skip to content

Commit 7d576fe

Browse files
committed
BUGFIX: Handle empty stdout when formatting logs
1 parent d62e013 commit 7d576fe

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Classes/Eel/ModuleHelper.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,12 @@
1212
*/
1313
class ModuleHelper implements ProtectedContextAwareInterface
1414
{
15-
public function formatStdOutput(string $stdOut): string
15+
public function formatStdOutput(?string $stdOut): string
1616
{
17+
if (!$stdOut) {
18+
return '';
19+
}
20+
1721
$escapedString = $stdOut;
1822
$lines = array_reverse(array_filter(preg_split("/\r\n|\n|\r/", $escapedString)));
1923
$lineCount = count($lines);

0 commit comments

Comments
 (0)