diff options
author | tailor <joel@pbwiki.com> | 2008-01-24 04:12:53 +0000 |
---|---|---|
committer | tailor <joel@pbwiki.com> | 2008-01-24 04:12:53 +0000 |
commit | 6d934bb91098f650fd6aefbf6e3d67af73e236e9 (patch) | |
tree | a523f3f54c3371286934defb4f685f0b9edda99a /Auth | |
parent | 1190765378a4268713f78dce5c7d6d5199ae89e4 (diff) | |
download | php-openid-6d934bb91098f650fd6aefbf6e3d67af73e236e9.zip php-openid-6d934bb91098f650fd6aefbf6e3d67af73e236e9.tar.gz php-openid-6d934bb91098f650fd6aefbf6e3d67af73e236e9.tar.bz2 |
[project @ ParanoidHTTPFetcher.php (supportsSSL): Updated to work under PHP 4.]
The official documentation lies, curl_version() returns an array in PHP 5 and a string in PHP 4.
Diffstat (limited to 'Auth')
-rw-r--r-- | Auth/Yadis/ParanoidHTTPFetcher.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Auth/Yadis/ParanoidHTTPFetcher.php b/Auth/Yadis/ParanoidHTTPFetcher.php index 08aced6..ab111f8 100644 --- a/Auth/Yadis/ParanoidHTTPFetcher.php +++ b/Auth/Yadis/ParanoidHTTPFetcher.php @@ -60,7 +60,13 @@ class Auth_Yadis_ParanoidHTTPFetcher extends Auth_Yadis_HTTPFetcher { function supportsSSL() { $v = curl_version(); - return in_array('https', $v['protocols']); + if(is_array($v)) { + return in_array('https', $v['protocols']); + } elseif (is_string($v)) { + return preg_match('/OpenSSL/i', $v); + } else { + return 0; + } } function get($url, $extra_headers = null) |