Skip to content

Commit d456f60

Browse files
authored
Update Cursor.php (#37458)
Order by column that can be null given me "Unable to find parameter [last_answer] in pagination item.". I solved it by this change and make 2 orders by, first is the id that won't be null, second is "last_answer" that can be null, and worked.
1 parent d6831e9 commit d456f60

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Illuminate/Pagination/Cursor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function __construct(array $parameters, $pointsToNextItems = true)
4343
*/
4444
public function parameter(string $parameterName)
4545
{
46-
if (! isset($this->parameters[$parameterName])) {
46+
if (! array_key_exists($parameterName, $this->parameters)) {
4747
throw new UnexpectedValueException("Unable to find parameter [{$parameterName}] in pagination item.");
4848
}
4949

0 commit comments

Comments
 (0)