Browse Source

Fix breaking when spaces in log name (closes #5)

tags/v0.8.2
itismadness 6 years ago
parent
commit
b38c25a13d
1 changed files with 8 additions and 4 deletions
  1. +8
    -4
      src/Logchecker.php

+ 8
- 4
src/Logchecker.php View File

@@ -439,10 +439,14 @@ class Logchecker {
$GoodString = 'OK'; $GoodString = 'OK';
} }


$CommandExists = Util::commandExists($Command);
$Out = shell_exec("{$Command} {$this->LogPath}");
if (Util::strposArray($Out, $BadStrings) !== false || strpos($Out, $GoodString) === false) {
$this->Checksum = false;
if (Util::commandExists($Command)) {
$Out = shell_exec("{$Command} ".escapeshellarg($this->LogPath));
if ($Out == null || Util::strposArray($Out, $BadStrings) !== false || strpos($Out, $GoodString) === false) {
$this->Checksum = false;
}
}
else {
$this->account("Could not find {$Command}, checksum not validated.", false, false, false, true);
} }
} }




Loading…
Cancel
Save