We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4ff460d commit 5b1b5b7Copy full SHA for 5b1b5b7
Raven/Client.php
@@ -13,10 +13,14 @@ class Client extends Raven_Client
13
{
14
public function __construct()
15
16
- $env = include $_SERVER['DOCUMENT_ROOT'] . '/../app/etc/env.php';
+ $ravenDNS = null;
17
+ $options = [ ];
18
- $options = [];
19
- $ravenDNS = array_key_exists('raven_dns', $env) ? $env['raven_dns'] : null;
+ if ( php_sapi_name() !== 'cli')
20
+ {
21
+ $env = include $_SERVER[ 'DOCUMENT_ROOT' ] . '/../app/etc/env.php';
22
+ $ravenDNS = array_key_exists('raven_dns', $env) ? $env[ 'raven_dns' ] : null;
23
+ }
24
25
parent::__construct($ravenDNS, $options);
26
}
0 commit comments