Skip to content
Snippets Groups Projects
Commit d25d83ad authored by Jaime Perez Crespo's avatar Jaime Perez Crespo
Browse files

Fix build. It was broken due to a chicken & egg problem, with...

Fix build. It was broken due to a chicken & egg problem, with SimpleSAML_Configuration raising creating a new SimpleSAML_Error_Exception that tries to load the configuration.
parent 3e9d8b1c
No related branches found
No related tags found
No related merge requests found
......@@ -31,22 +31,6 @@ class SimpleSAML_Error_Exception extends Exception
private $cause;
/**
* Whether debugging is enabled or not.
*
* @var boolean
*/
private $debug;
/**
* The base directory for this SimpleSAMLphp installation.
*
* @var string
*/
private $basedir;
/**
* Constructor for this error.
*
......@@ -69,10 +53,6 @@ class SimpleSAML_Error_Exception extends Exception
if ($cause !== null) {
$this->cause = SimpleSAML_Error_Exception::fromException($cause);
}
$config = SimpleSAML_Configuration::getInstance();
$this->debug = $config->getBoolean('debug', false);
$this->basedir = $config->getBaseDir();
}
......@@ -189,6 +169,7 @@ class SimpleSAML_Error_Exception extends Exception
public function formatBacktrace($anonymize = false)
{
$ret = array();
$basedir = SimpleSAML_Configuration::getInstance()->getBaseDir();
$e = $this;
do {
......@@ -200,7 +181,7 @@ class SimpleSAML_Error_Exception extends Exception
$depth = count($e->backtrace);
foreach ($e->backtrace as $i => $trace) {
if ($anonymize) {
$trace = str_replace($this->basedir, '', $trace);
$trace = str_replace($basedir, '', $trace);
}
$ret[] = ($depth - $i - 1).' '.$trace;
......@@ -217,7 +198,7 @@ class SimpleSAML_Error_Exception extends Exception
*/
protected function logBacktrace()
{
if (!$this->debug) {
if (!SimpleSAML_Configuration::getInstance()->getBoolean('debug', false)) {
return;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment