summaryrefslogtreecommitdiffstats
path: root/system/libraries
diff options
context:
space:
mode:
authorHashem Qolami <hashem@qolami.com>2013-07-21 23:22:04 +0200
committerHashem Qolami <hashem@qolami.com>2013-07-21 23:22:04 +0200
commit05370bf751aa6b7885ee548de6f6f2c14571765a (patch)
treeecf15010ca69ba2645f5224b436c4cfe016b2377 /system/libraries
parent90803ce9d3f9343c5f2ea37cc53a390e9c2ee8c8 (diff)
change empty function to Identical comparison operator
Signed-off-by: Hashem Qolami <hashem@qolami.com>
Diffstat (limited to 'system/libraries')
-rw-r--r--system/libraries/Form_validation.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index 47c9dcaa3..8b9bfa897 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -583,7 +583,7 @@ class CI_Form_validation {
// If the field is blank, but NOT required, no further tests are necessary
$callback = FALSE;
- if ( ! in_array('required', $rules) && ($postdata === NULL OR empty($postdata)))
+ if ( ! in_array('required', $rules) && ($postdata === NULL OR $postdata === ''))
{
// Before we bail out, does the rule contain a callback?
if (preg_match('/(callback_\w+(\[.*?\])?)/', implode(' ', $rules), $match))
@@ -598,7 +598,7 @@ class CI_Form_validation {
}
// Isset Test. Typically this rule will only apply to checkboxes.
- if (($postdata === NULL OR empty($postdata)) && $callback === FALSE)
+ if (($postdata === NULL OR $postdata === '') && $callback === FALSE)
{
if (in_array('isset', $rules, TRUE) OR in_array('required', $rules))
{