Skip to content

Commit

Permalink
Fixing a couple failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Feb 9, 2013
1 parent fa2f76a commit 61420f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Cake/Model/Datasource/Database/Query.php
Expand Up @@ -965,7 +965,7 @@ public function orHaving($conditions, $types = []) {
* @return Query
*/
public function limit($num) {
if (!is_object($num)) {
if ($num !== null && !is_object($num)) {
$num = (int)$num;
}
$this->_parts['limit'] = $num;
Expand All @@ -990,7 +990,7 @@ public function limit($num) {
* @return Query
*/
public function offset($num) {
if (!is_object($num)) {
if ($num !== null && !is_object($num)) {
$num = (int)$num;
}
$this->_parts['offset'] = $num;
Expand Down

0 comments on commit 61420f0

Please sign in to comment.