Skip to content
Snippets Groups Projects
Commit 432b3274 authored by Olav Morken's avatar Olav Morken
Browse files

UnserializableException: Handle exceptions whose code is not an int.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2465 44740490-163a-0410-bde0-09ae8108e29a
parent e0ada881
No related branches found
No related tags found
No related merge requests found
......@@ -19,6 +19,12 @@ class SimpleSAML_Error_UnserializableException extends SimpleSAML_Error_Exceptio
$msg = get_class($original) . ': ' . $original->getMessage();
$code = $original->getCode();
if (!is_int($code)) {
/* PDOException uses a string as the code. Filter it out here. */
$code = -1;
}
parent::__construct($msg, $code);
$this->setBacktrace(SimpleSAML_Utilities::buildBacktrace($original));
......
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