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)
181
181
break ;
182
182
}
183
183
184
- $ limitHeader = explode ( ' / ' , $ response ->getHeader ('X-Shopify-Shop-Api-Call-Limit ' ), 2 );
184
+ $ apiCallLimit = $ response ->getHeader ('X-Shopify-Shop-Api-Call-Limit ' );
185
185
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
+ }
188
191
}
189
-
192
+
190
193
$ retryAfter = $ response ->getHeader ('Retry-After ' );
191
194
192
195
if ($ retryAfter === null ) {
You can’t perform that action at this time.
0 commit comments