Skip to content

Commit

Permalink
Fix overwriting variable
Browse files Browse the repository at this point in the history
  • Loading branch information
jsor committed Oct 28, 2015
1 parent 9f4ba18 commit 2560c94
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Resource.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,9 @@ public function getFirstLink($rel)

private function getLinkData($rel)
{
$rel = $this->resolveLinkRel($rel);
$resolvedRel = $this->resolveLinkRel($rel);

if (false === $rel) {
if (false === $resolvedRel) {
throw new Exception\InvalidArgumentException(
sprintf(
'Unknown link %s.',
Expand All @@ -178,7 +178,7 @@ private function getLinkData($rel)
);
}

return $this->normalizeData($this->links[$rel], function($link) {
return $this->normalizeData($this->links[$resolvedRel], function($link) {
return ['href' => $link];
});
}
Expand Down

0 comments on commit 2560c94

Please sign in to comment.