From 6d934bb91098f650fd6aefbf6e3d67af73e236e9 Mon Sep 17 00:00:00 2001 From: tailor Date: Thu, 24 Jan 2008 04:12:53 +0000 Subject: [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. --- Auth/Yadis/ParanoidHTTPFetcher.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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) -- cgit v1.1