File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -276,6 +276,7 @@ public function rewind()
276
276
*
277
277
* @param int|string $position The position to move to. If the collection is
278
278
* indexed, you can also supply a value to move the pointer to.
279
+ * A non-existent index will move the pointer to "-1".
279
280
*
280
281
* @return Response The {@link Response} at the specified position, or FALSE
281
282
* if the specified position is not valid.
@@ -284,7 +285,9 @@ public function seek($position)
284
285
{
285
286
$ this ->position = is_int ($ position )
286
287
? $ position
287
- : $ this ->responsesIndex [$ this ->index ][$ position ];
288
+ : ($ this ->offsetExists ($ position )
289
+ ? $ this ->responsesIndex [$ this ->index ][$ position ]
290
+ : -1 );
288
291
return $ this ->current ();
289
292
}
290
293
You can’t perform that action at this time.
0 commit comments