Commit c906c1e7 authored by Robert Lyon's avatar Robert Lyon

Fixing type checking on min/max values (Bug #1394732)

Change-Id: I042c1127f7601483e8723b2e31bf07683accf2c0
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 685dfca0
......@@ -34,7 +34,7 @@
* @return string The error message, if the value is invalid.
*/
function pieform_rule_maxvalue(Pieform $form, $value, $element, $maxvalue) {/*{{{*/
if ($value != '' && doubleval($value) > $maxvalue) {
if ($value !== '' && doubleval($value) > $maxvalue) {
return sprintf($form->i18n('rule', 'maxvalue', 'maxvalue', $element), $maxvalue);
}
}/*}}}*/
......@@ -34,7 +34,7 @@
* @return string The error message, if the value is invalid.
*/
function pieform_rule_minvalue(Pieform $form, $value, $element, $minvalue) {/*{{{*/
if ($value != '' && doubleval($value) < $minvalue) {
if ($value !== '' && doubleval($value) < $minvalue) {
return sprintf($form->i18n('rule', 'minvalue', 'minvalue', $element), $minvalue);
}
}/*}}}*/
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment