Skip to content

Commit

Permalink
Treat hide_location error as user ones
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Čihař <michal@cihar.com>
  • Loading branch information
nijel committed Sep 2, 2016
1 parent eb3e3b7 commit 829d51c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions libraries/Error.php
Original file line number Diff line number Diff line change
Expand Up @@ -433,13 +433,13 @@ public function getDisplay()
{
$this->isDisplayed(true);
$retval = '<div class="' . $this->getLevel() . '">';
if (! $this->isUserError() && ! $this->hide_location) {
if (! $this->isUserError()) {
$retval .= '<strong>' . $this->getType() . '</strong>';
$retval .= ' in ' . $this->getFile() . '#' . $this->getLine();
$retval .= "<br />\n";
}
$retval .= $this->getMessage();
if (! $this->isUserError() && ! $this->hide_location) {
if (! $this->isUserError()) {
$retval .= "<br />\n";
$retval .= "<br />\n";
$retval .= "<strong>Backtrace</strong><br />\n";
Expand All @@ -458,7 +458,8 @@ public function getDisplay()
*/
public function isUserError()
{
return $this->getNumber() & (E_USER_WARNING | E_USER_ERROR | E_USER_NOTICE);
return $this->hide_location ||
($this->getNumber() & (E_USER_WARNING | E_USER_ERROR | E_USER_NOTICE));
}

/**
Expand Down

0 comments on commit 829d51c

Please sign in to comment.