Updated logic

This commit is contained in:
Miguel Nogueira 2020-12-27 19:42:48 +00:00
parent b2ef7980e8
commit f6c86b3b74
Signed by: miguel456
GPG Key ID: 2CF61B825316C6A0
1 changed files with 1 additions and 1 deletions

View File

@ -44,7 +44,7 @@ class CatAPI {
Analog::debug('CatAPI: Fetching cat picture with count ' . $count . ' and size ' . $size); Analog::debug('CatAPI: Fetching cat picture with count ' . $count . ' and size ' . $size);
// anti smart-ass device // anti smart-ass device
if ($count > 0 && $count <= $this->hardLimit) if ($count <= $this->hardLimit)
{ {
Analog::error('CatAPI: Invalid arguments: Count of ' . $count . ' is over the hard limit of ' . $this->hardLimit); Analog::error('CatAPI: Invalid arguments: Count of ' . $count . ' is over the hard limit of ' . $this->hardLimit);
throw new Exception("Unacceptable quantity: " . $count . ". Please try again with no more than " . $this->hardLimit . " picture(s)."); throw new Exception("Unacceptable quantity: " . $count . ". Please try again with no more than " . $this->hardLimit . " picture(s).");