Skip to content

Instantly share code, notes, and snippets.

@jahid32
Created October 28, 2019 12:37
Show Gist options
  • Save jahid32/0657cb16f446c505ff9f65530bcd8104 to your computer and use it in GitHub Desktop.
Save jahid32/0657cb16f446c505ff9f65530bcd8104 to your computer and use it in GitHub Desktop.
Laravel 5.3 Count problem
//Illuminate/Database/Eloguent/Builder.php
// Line 1231
- $originalWhereCount = count($query->wheres);
+ $originalWhereCount = is_null($query->wheres) ? 0 : count($query->wheres);
// Line 1277
- return count($query->wheres) > $originalWhereCount;
+ return (is_null($query->wheres) ? 0 : count($query->wheres)) > $originalWhereCount;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment