X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FHelper%2FHttpClientFactory.php;h=4602a6841614f8c6ad61ec6b72c45e9accd2f77b;hb=f808b01692a835673f328d7221ba8c212caa9b61;hp=09439dff6bab2612580d4ca9bf91667337587201;hpb=5b914b0422e08c4b4859050026823af677c97727;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/Helper/HttpClientFactory.php b/src/Wallabag/CoreBundle/Helper/HttpClientFactory.php index 09439dff..4602a684 100644 --- a/src/Wallabag/CoreBundle/Helper/HttpClientFactory.php +++ b/src/Wallabag/CoreBundle/Helper/HttpClientFactory.php @@ -27,7 +27,7 @@ class HttpClientFactory * * @param \GuzzleHttp\Cookie\CookieJar $cookieJar * @param string $restrictedAccess This param is a kind of boolean. Values: 0 or 1 - * @param LoggerInterface $logger + * @param LoggerInterface $logger */ public function __construct(CookieJar $cookieJar, $restrictedAccess, LoggerInterface $logger) { @@ -41,7 +41,7 @@ class HttpClientFactory */ public function buildHttpClient() { - $this->logger->log('debug', 'Restricted access config enabled?', array('enabled' => (int) $this->restrictedAccess)); + $this->logger->log('debug', 'Restricted access config enabled?', ['enabled' => (int) $this->restrictedAccess]); if (0 === (int) $this->restrictedAccess) { return; @@ -51,6 +51,7 @@ class HttpClientFactory $this->cookieJar->clear(); // need to set the (shared) cookie jar $client = new Client(['handler' => new SafeCurlHandler(), 'defaults' => ['cookies' => $this->cookieJar]]); + foreach ($this->subscribers as $subscriber) { $client->getEmitter()->attach($subscriber); }