Check if links is an array

This commit is contained in:
jaypatel512 and sdcoffey
2017-01-18 13:17:08 -06:00
parent 1f87129870
commit fbb764f57c

View File

@@ -41,7 +41,7 @@ class PayPalResourceModel extends PayPalModel implements IResource
public function getLink($rel) public function getLink($rel)
{ {
if ($this->links) { if (is_array($this->links)) {
foreach ($this->links as $link) { foreach ($this->links as $link) {
if ($link->getRel() == $rel) { if ($link->getRel() == $rel) {
return $link->getHref(); return $link->getHref();