Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Check if shell_exec response is not false
Signed-off-by: Daniel Kesselberg <[email protected]>
  • Loading branch information
kesselb committed Sep 3, 2022
commit e8957e389e6bbb83898c6061545131ea1ddeeadf
2 changes: 1 addition & 1 deletion lib/OperatingSystems/DefaultOs.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ protected function readContent(string $filename): string {

protected function executeCommand(string $command): string {
$output = @shell_exec(escapeshellcmd($command));
if ($output === null || $output === '') {
if ($output === false || $output === null || $output === '') {
throw new \RuntimeException('No output for command: "' . $command . '"');
}
return $output;
Expand Down