Skip to content
This repository has been archived by the owner on Aug 30, 2023. It is now read-only.

Commit

Permalink
Slight tweaks towards http request detection (refs GH-113)
Browse files Browse the repository at this point in the history
  • Loading branch information
dcramer committed Sep 15, 2013
1 parent b5a2211 commit c27fe51
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Raven/Client.php
Expand Up @@ -264,7 +264,7 @@ public function captureQuery($query, $level=self::INFO, $engine = '')

private function is_http_request()
{
return isset($_SERVER['REQUEST_METHOD']);
return isset($_SERVER['REQUEST_METHOD']) && PHP_SAPI !== 'cli';
}

protected function get_http_data()
Expand Down Expand Up @@ -577,7 +577,7 @@ private function uuid4()
private function get_current_url()
{
// When running from commandline the REQUEST_URI is missing.
if ($this->_server_variable('REQUEST_URI') === '') {
if (!isset($_SERVER['REQUEST_URI'])) {
return null;
}

Expand Down

0 comments on commit c27fe51

Please sign in to comment.