File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -181,12 +181,15 @@ protected static function processRequest($ch)
181181 break ;
182182 }
183183
184- $ limitHeader = explode ( ' / ' , $ response ->getHeader ('X-Shopify-Shop-Api-Call-Limit ' ), 2 );
184+ $ apiCallLimit = $ response ->getHeader ('X-Shopify-Shop-Api-Call-Limit ' );
185185
186- if (isset ($ limitHeader [1 ]) && $ limitHeader [0 ] < $ limitHeader [1 ]) {
187- throw new ResourceRateLimitException ($ response ->getBody ());
186+ if (!empty ($ apiCallLimit )) {
187+ $ limitHeader = explode ('/ ' , $ apiCallLimit , 2 );
188+ if (isset ($ limitHeader [1 ]) && $ limitHeader [0 ] < $ limitHeader [1 ]) {
189+ throw new ResourceRateLimitException ($ response ->getBody ());
190+ }
188191 }
189-
192+
190193 $ retryAfter = $ response ->getHeader ('Retry-After ' );
191194
192195 if ($ retryAfter === null ) {
You can’t perform that action at this time.
0 commit comments