summaryrefslogtreecommitdiffstats
path: root/Auth/OpenID.php
diff options
context:
space:
mode:
Diffstat (limited to 'Auth/OpenID.php')
-rw-r--r--Auth/OpenID.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/Auth/OpenID.php b/Auth/OpenID.php
index d5870d3..5a3aa96 100644
--- a/Auth/OpenID.php
+++ b/Auth/OpenID.php
@@ -444,6 +444,20 @@ class Auth_OpenID {
return $url;
}
+
+ /**
+ * Replacement (wrapper) for PHP's intval() because it's broken.
+ */
+ function intval($value)
+ {
+ $re = "/^\\d+$/";
+
+ if (!preg_match($re, $value)) {
+ return false;
+ }
+
+ return intval($value);
+ }
}
?> \ No newline at end of file