Add an additional type check to limit

This commit is contained in:
Timothy Warren 2014-06-30 11:16:50 -04:00
parent 618a561c71
commit d4838bada3
1 changed files with 2 additions and 2 deletions

View File

@ -101,7 +101,7 @@ class Query_Builder extends Abstract_Query_Builder implements Query_Builder_Inte
/** /**
* Value for limit string * Value for limit string
* @var string * @var int
*/ */
protected $limit; protected $limit;
@ -741,7 +741,7 @@ class Query_Builder extends Abstract_Query_Builder implements Query_Builder_Inte
*/ */
public function limit($limit, $offset=FALSE) public function limit($limit, $offset=FALSE)
{ {
$this->limit = $limit; $this->limit = (int) $limit;
$this->offset = $offset; $this->offset = $offset;
return $this; return $this;