summaryrefslogtreecommitdiffstats
path: root/Auth/OpenID.php
diff options
context:
space:
mode:
Diffstat (limited to 'Auth/OpenID.php')
-rw-r--r--Auth/OpenID.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/Auth/OpenID.php b/Auth/OpenID.php
index d46e808..60bcb6f 100644
--- a/Auth/OpenID.php
+++ b/Auth/OpenID.php
@@ -139,6 +139,26 @@ class Auth_OpenID {
}
}
}
+
+ /**
+ * Convenience function for getting array values.
+ *
+ * @access private
+ */
+ function arrayGet($arr, $key, $fallback = null)
+ {
+ if (is_array($arr)) {
+ if (array_key_exists($key, $arr)) {
+ return $arr[$key];
+ } else {
+ return $fallback;
+ }
+ } else {
+ trigger_error("Auth_OpenID::arrayGet expected " .
+ "array as first parameter", E_USER_WARNING);
+ return false;
+ }
+ }
}
?> \ No newline at end of file