File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -555,16 +555,15 @@ public function getLinks($responseHeaders){
555
555
}
556
556
557
557
public function getLink ($ responseHeaders , $ type ='next ' ){
558
- $ responseHeaders = json_decode ($ responseHeaders );
559
558
560
- if (property_exists ( $ responseHeaders , 'x-shopify-api-version ' )
561
- && $ responseHeaders->{ 'x-shopify-api-version ' } < '2019-07 ' ){
559
+ if (array_key_exists ( 'x-shopify-api-version ' , $ responseHeaders )
560
+ && $ responseHeaders[ 'x-shopify-api-version ' ] < '2019-07 ' ){
562
561
return null ;
563
562
}
564
563
565
- if (!empty ($ responseHeaders-> link )) {
566
- if (stristr ($ responseHeaders-> link [0 ], '; rel=" ' .$ type .'" ' ) > -1 ) {
567
- $ headerLinks = explode (', ' , $ responseHeaders-> link [0 ]);
564
+ if (!empty ($ responseHeaders[ ' link ' ] )) {
565
+ if (stristr ($ responseHeaders[ ' link ' ] [0 ], '; rel=" ' .$ type .'" ' ) > -1 ) {
566
+ $ headerLinks = explode (', ' , $ responseHeaders[ ' link ' ] [0 ]);
568
567
foreach ($ headerLinks as $ headerLink ) {
569
568
if (stristr ($ headerLink , '; rel=" ' .$ type .'" ' ) === -1 ) {
570
569
continue ;
You can’t perform that action at this time.
0 commit comments