forked from spacejewelhosting/raspberry-bot
Update embarassing logic
This commit is contained in:
parent
f6c86b3b74
commit
1b6214a2ec
|
@ -44,7 +44,7 @@ class CatAPI {
|
|||
Analog::debug('CatAPI: Fetching cat picture with count ' . $count . ' and size ' . $size);
|
||||
|
||||
// anti smart-ass device
|
||||
if ($count <= $this->hardLimit)
|
||||
if ($count > $this->hardLimit || $count <= 0)
|
||||
{
|
||||
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).");
|
||||
|
|
Loading…
Reference in New Issue