Skip to content

Commit

Permalink
Resolve the-djmaze#1147
Browse files Browse the repository at this point in the history
  • Loading branch information
the-djmaze committed May 31, 2023
1 parent 3c28bc6 commit 9eaa0f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions snappymail/v/0.0.0/app/libraries/MailSo/Log/Logger.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function __construct(bool $bMainLogger = false)
if (\is_callable('pcntl_signal')) {
\pcntl_async_signals(true);
foreach (static::$SIGNALS as $SIGNAL) {
\pcntl_signal(\constant($SIGNAL), [$this, 'signalHandler']);
\defined($SIGNAL) && \pcntl_signal(\constant($SIGNAL), [$this, 'signalHandler']);
}
}
}
Expand Down Expand Up @@ -209,7 +209,7 @@ public function signalHandler($signo)
}
if ($this->bUsed) {
foreach (static::$SIGNALS as $SIGNAL) {
if (\constant($SIGNAL) == $signo) {
if (\defined($SIGNAL) && \constant($SIGNAL) == $signo) {
$this->Write("Caught {$SIGNAL}");
break;
}
Expand Down

0 comments on commit 9eaa0f4

Please sign in to comment.