Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions application/libraries/Validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ public function num_gt($fields, $num, $err_msg = '') {
foreach ($fields as $v) {
$this->num($v, $err_msg);
if ($this->is_valid()) {
if ($this->data[$v] < $num) {
if ((int)$this->data[$v] > $num) {
$this->_error($err_msg, $v);
}
}
Expand All @@ -512,7 +512,7 @@ public function num_lt($fields, $num, $err_msg = '') {
foreach ($fields as $v) {
$this->num($v, $err_msg);
if ($this->is_valid()) {
if ($this->data[$v] > $num) {
if ((int)$this->data[$v] < $num) {
$this->_error($err_msg, $v);
}
}
Expand Down