diff options
Diffstat (limited to 'Auth/OpenID.php')
-rw-r--r-- | Auth/OpenID.php | 14 |
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 |