Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

(fixes #2233) replace is_numeric to ctype_digit for check number

  • Loading branch information...
commit d797b71be89d9318a7c40bb2c53405fa32c9d3e3 1 parent 17c947d
@y-watanabe y-watanabe authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/api/opAPI.class.php
View
4 lib/api/opAPI.class.php
@@ -157,9 +157,9 @@ public function setOffsetAndLimitation()
$this->getQuery()->setHydrationMode(Doctrine::HYDRATE_RECORD);
$maxResults = $this->getParameter('max-results', 25);
- $this->query->limit((is_numeric($maxResults) && 1 <= $maxResults) ? $maxResults : 25);
+ $this->query->limit((ctype_digit((string)$maxResults) && 1 <= $maxResults) ? $maxResults : 25);
$start = $this->getParameter('start', 1);
- $this->query->offset((is_numeric($start) && 1 <= $start) ? $start - 1 : 0);
+ $this->query->offset((ctype_digit((string)$start) && 1 <= $start) ? $start - 1 : 0);
return $this;
}
Please sign in to comment.
Something went wrong with that request. Please try again.