Skip to content

Commit

Permalink
$retarray[0] may not be defined
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeus committed Oct 7, 2019
1 parent ce317ef commit f01d283
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/TrustedTimestamps.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ public static function createRequestfile($hash, $hash_algo = 'sha1')

$retarray = array();
exec($cmd." 2>&1", $retarray, $retcode);

if ($retcode !== 0) {
throw new Exception("OpenSSL does not seem to be installed: ".implode(", ", $retarray));
}

if (stripos($retarray[0], "openssl:Error") !== false) {
if (isset($retarray[0]) && stripos($retarray[0], "openssl:Error") !== false) {
throw new Exception("There was an error with OpenSSL. Is version >= 0.99 installed?: ".implode(", ", $retarray));
}

Expand Down

0 comments on commit f01d283

Please sign in to comment.