diff --git a/plugins/FeedsHTTPFetcher.inc b/plugins/FeedsHTTPFetcher.inc index b3a8016..3761113 100644 --- a/plugins/FeedsHTTPFetcher.inc +++ b/plugins/FeedsHTTPFetcher.inc @@ -28,11 +28,11 @@ class FeedsHTTPFetcherResult extends FeedsFetcherResult { /** * - * Whether to ignore SSL validation errors and therefore accept invalid certificates. + * Whether to ignore SSL validation errors. * * @var bool */ - protected $accept_invalid_cert; + protected $acceptInvalidCert; /** * Constructor. @@ -47,7 +47,7 @@ class FeedsHTTPFetcherResult extends FeedsFetcherResult { public function getRaw() { if (!isset($this->raw)) { feeds_include_library('http_request.inc', 'http_request'); - $result = http_request_get($this->url, NULL, NULL, $this->accept_invalid_cert, $this->timeout); + $result = http_request_get($this->url, NULL, NULL, $this->acceptInvalidCert, $this->timeout); if (!in_array($result->code, array(200, 201, 202, 203, 204, 205, 206))) { throw new Exception(t('Download of @url failed with code !code.', array('@url' => $this->url, '!code' => $result->code))); } @@ -66,14 +66,15 @@ class FeedsHTTPFetcherResult extends FeedsFetcherResult { } /** - * Sets accept invalid certificates option. + * Sets the accept invalid certificates option. * * @param bool $accept_invalid_cert * Whether to accept invalid certificates. */ public function setAcceptInvalidCert($accept_invalid_cert) { - $this->accept_invalid_cert = $accept_invalid_cert; + $this->acceptInvalidCert = (bool) $accept_invalid_cert; } + } /** @@ -199,7 +200,7 @@ class FeedsHTTPFetcher extends FeedsFetcher { $form['advanced']['accept_invalid_cert'] = array( '#type' => 'checkbox', '#title' => t('Accept invalid SSL certificates'), - '#description' => t('IMPORTANT: This setting will force curl to completely ignore all SSL errors. This is potentially a major security risk and should be used with caution.'), + '#description' => t('IMPORTANT: This setting will force cURL to completely ignore all SSL errors. This is a major security risk and should only be used during development.'), '#default_value' => $this->config['accept_invalid_cert'], );