Skip to content

Commit

Permalink
Use PHP_SAPI
Browse files Browse the repository at this point in the history
  • Loading branch information
the-djmaze committed Aug 12, 2024
1 parent 8c6f0ad commit 55d7d52
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion snappymail/v/0.0.0/app/libraries/RainLoop/Actions.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ function __construct()
. $oHttp->GetClientIp($this->oConfig->Get('labs', 'http_client_ip_check_proxy', false))
. '][PID:' . (\MailSo\Base\Utils::FunctionCallable('getmypid') ? \getmypid() : 'unknown')
. '][' . \MailSo\Base\Http::GetServer('SERVER_SOFTWARE', '~')
. '][' . (\MailSo\Base\Utils::FunctionCallable('php_sapi_name') ? \php_sapi_name() : '~')
. '][' . \PHP_SAPI
. '][Streams:' . \implode(',', \stream_get_transports())
. '][' . $oHttp->GetMethod() . ' ' . $oHttp->GetScheme() . '://' . $oHttp->GetHost(false) . \MailSo\Base\Http::GetServer('REQUEST_URI', '') . ']'
);
Expand Down
2 changes: 1 addition & 1 deletion snappymail/v/0.0.0/imapsync.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

use MailSo\Net\Enumerations\ConnectionSecurityType as SecurityType;

if (4 > \count($_SERVER['argv']) || \in_array('--help', $_SERVER['argv'])) {
if ('cli' !== PHP_SAPI || 4 > \count($_SERVER['argv']) || \in_array('--help', $_SERVER['argv'])) {
echo 'OPTIONS
usage: imapsync.php [options]
Expand Down

0 comments on commit 55d7d52

Please sign in to comment.