diff options
author | Jaime Perez Crespo <jaime.perez@uninett.no> | 2016-04-13 14:04:32 +0200 |
---|---|---|
committer | Jaime Perez Crespo <jaime.perez@uninett.no> | 2016-04-13 14:04:32 +0200 |
commit | d25d83ad98af77395748ab2f9af64ae0cc5e976e (patch) | |
tree | 9b27faa267a161489e391b5218cdc9742ee292b0 /lib/SimpleSAML | |
parent | 3e9d8b1c075309c27747e7e3659bd5835d406037 (diff) | |
download | simplesamlphp-d25d83ad98af77395748ab2f9af64ae0cc5e976e.zip simplesamlphp-d25d83ad98af77395748ab2f9af64ae0cc5e976e.tar.gz simplesamlphp-d25d83ad98af77395748ab2f9af64ae0cc5e976e.tar.bz2 |
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.
Diffstat (limited to 'lib/SimpleSAML')
-rw-r--r-- | lib/SimpleSAML/Error/Exception.php | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/lib/SimpleSAML/Error/Exception.php b/lib/SimpleSAML/Error/Exception.php index de3de2a..019a27c 100644 --- a/lib/SimpleSAML/Error/Exception.php +++ b/lib/SimpleSAML/Error/Exception.php @@ -32,22 +32,6 @@ class SimpleSAML_Error_Exception extends Exception /** - * 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. * * Note that the cause will be converted to a SimpleSAML_Error_UnserializableException unless it is a subclass of @@ -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; } |