Permalink
Browse files

added check for non-ssl curl

  • Loading branch information...
1 parent d5b3be2 commit 993c766bc01e154e663882ab2f645556f6088b42 Adrian Rollett committed Jul 12, 2009
Showing with 6 additions and 2 deletions.
  1. +6 −2 ProwlPHP.php
View
@@ -90,9 +90,13 @@ public function push($params, $is_post=false)
public function getError()
{
+ $curl_version = (curl_version());
+ if ($curl_version['ssl_version'] == '') {
+ return 'Your curl library does not support SSL connections'; break;
+ }
switch($this->_return_code)
{
- case 200: return 'Request Successfull.'; break;
+ case 200: return 'Request Successful.'; break;
case 400: return 'Bad request, the parameters you provided did not validate.'; break;
case 401: return 'The API key given is not valid, and does not correspond to a user.'; break;
case 405: return 'Method not allowed, you attempted to use a non-SSL connection to Prowl.'; break;
@@ -187,4 +191,4 @@ private function _setProxy($proxy, $userpwd=null)
}
}
-?>
+?>

0 comments on commit 993c766

Please sign in to comment.