mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
Fix error handling issues
This commit is contained in:
parent
936568a8a5
commit
978d3d167a
4 changed files with 37 additions and 12 deletions
|
|
@ -366,7 +366,7 @@ class VariableBase
|
|||
}
|
||||
|
||||
// Check minimum and maximum lengths.
|
||||
$length = iconv_strlen($value, 'UTF-8');
|
||||
$length = is_scalar($value) ? iconv_strlen($value, 'UTF-8') : (is_countable($value) ? count($value) : 1);
|
||||
if (isset($this->minlength) && $this->minlength > 0 && $length < $this->minlength)
|
||||
{
|
||||
throw new \Rhymix\Framework\Exceptions\QueryError('Variable ' . $this->var . ' for column ' . $this->column . ' must contain no less than ' . $this->minlength . ' characters');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue