Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Merge branch 'master' into hotfix/json-renderer-merge-unnamed-children
Browse files Browse the repository at this point in the history
  • Loading branch information
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Reader/Reader.php
Original file line number Diff line number Diff line change
Expand Up @@ -243,11 +243,11 @@ public static function import($uri, $etag = null, $lastModified = null)
} else {
$responseXml = $response->getBody();
$cache->setItem($cacheId, $responseXml);
if ($response->getHeader('ETag')) {
$cache->setItem($cacheId . '_etag', $response->getHeader('ETag'));
if ($response->headers()->get('ETag')) {
$cache->setItem($cacheId . '_etag', $response->headers()->get('ETag')->getFieldValue());
}
if ($response->getHeader('Last-Modified')) {
$cache->setItem($cacheId . '_lastmodified', $response->getHeader('Last-Modified'));
if ($response->headers()->get('Last-Modified')) {
$cache->setItem($cacheId . '_lastmodified', $response->headers()->get('Last-Modified')->getFieldValue());
}
}
return self::importString($responseXml);
Expand Down

0 comments on commit bfed36c

Please sign in to comment.