Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
  • 2 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Showing with 18 additions and 0 deletions.
  1. +15 −0 src/Plugins/Firebug/ErrorManager.php
  2. +3 −0 src/Plugins/Firebug/Init.php
View
15 src/Plugins/Firebug/ErrorManager.php
@@ -46,10 +46,16 @@ public function setFirephp($firephp) {
}
public function logException($exception) {
+ if(!$this->firephp) {
+ return parent::logException($warning);
+ }
$this->firephp->error($exception, "Unhandled exception");
}
public function logError($error) {
+ if(!$this->firephp) {
+ return parent::logError($warning);
+ }
if(!is_array($error)) {
$this->firephp->error($error);
} else {
@@ -58,6 +64,9 @@ public function logError($error) {
}
public function logWarning($warning) {
+ if(!$this->firephp) {
+ return parent::logWarning($warning);
+ }
if(!is_array($warning)) {
$this->firephp->warn($warning);
} else {
@@ -66,6 +75,9 @@ public function logWarning($warning) {
}
public function logInfo($info) {
+ if(!$this->firephp) {
+ return parent::logInfo($warning);
+ }
if(!is_array($info)) {
$this->firephp->info($info);
} else {
@@ -74,6 +86,9 @@ public function logInfo($info) {
}
public function logHandledException(\Exception $exception) {
+ if(!$this->firephp) {
+ return parent::logHandledException($warning);
+ }
$this->firephp->info($exception, "Handled exception");
}
}
View
3 src/Plugins/Firebug/Init.php
@@ -44,6 +44,9 @@ class Init extends BaseInit {
protected $firephp;
public function everyTimeInit() {
+ if(PHP_SAPI == "cli") {
+ return;
+ }
// If we're not a dev, quit immediately
$user = User::me($this->container, false);
if($user && $user->isDev()) {

No commit comments for this range

Something went wrong with that request. Please try again.