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){
555555 }
556556
557557 public function getLink ($ responseHeaders , $ type ='next ' ){
558- $ responseHeaders = json_decode ($ responseHeaders );
559558
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 ' ){
562561 return null ;
563562 }
564563
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 ]);
568567 foreach ($ headerLinks as $ headerLink ) {
569568 if (stristr ($ headerLink , '; rel=" ' .$ type .'" ' ) === -1 ) {
570569 continue ;
You can’t perform that action at this time.
0 commit comments