Skip to content

Commit 16c3315

Browse files
authored
Merge pull request #140 from zealnagar/master
Bug solved for previous link in ShopifyResounce
2 parents 763cf8f + 742ec1e commit 16c3315

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/ShopifyResource.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ public function processResponse($responseArray, $dataKey = null)
551551

552552
public function getLinks($responseHeaders){
553553
$this->nextLink = $this->getLink($responseHeaders,'next');
554-
$this->prevLink = $this->getLink($responseHeaders,'prev');
554+
$this->prevLink = $this->getLink($responseHeaders,'previous');
555555
}
556556

557557
public function getLink($responseHeaders, $type='next'){
@@ -562,7 +562,6 @@ public function getLink($responseHeaders, $type='next'){
562562
}
563563

564564
if(!empty($responseHeaders['link'])) {
565-
var_dump($responseHeaders['link']);
566565
if (stristr($responseHeaders['link'], '; rel="'.$type.'"') > -1) {
567566
$headerLinks = explode(',', $responseHeaders['link']);
568567
foreach ($headerLinks as $headerLink) {

0 commit comments

Comments
 (0)