From 2d1fc98fa8955be1408d2cd157f836057ca4e91b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jaime=20P=C3=A9rez=20Crespo?= <jaime.perez@uninett.no>
Date: Tue, 26 Feb 2013 11:42:03 +0000
Subject: [PATCH] Fix for issue #524. The get() method of the SimpleSAML_Store
 interface should always return NULL in case of failure.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@3227 44740490-163a-0410-bde0-09ae8108e29a
---
 lib/SimpleSAML/Store/SQL.php | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/SimpleSAML/Store/SQL.php b/lib/SimpleSAML/Store/SQL.php
index 7b837c064..85fd4245b 100644
--- a/lib/SimpleSAML/Store/SQL.php
+++ b/lib/SimpleSAML/Store/SQL.php
@@ -252,6 +252,10 @@ class SimpleSAML_Store_SQL extends SimpleSAML_Store {
 		}
 		$value = urldecode($value);
 		$value = unserialize($value);
+
+                if ($value === FALSE) {
+                    return NULL;
+                }
 		return $value;
 	}
 
-- 
GitLab