summaryrefslogtreecommitdiffstats
path: root/system/libraries/Form_validation.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2013-01-15 03:41:02 +0100
committerAndrey Andreev <narf@bofh.bg>2013-01-15 03:41:02 +0100
commitb26bb6ef76eb2f8327dafe085ae6bca14c22160b (patch)
treea9592331df604d054037a3759819a774fcf1410f /system/libraries/Form_validation.php
parent5b60a3bb74d39b8718081cb62c21f9f48e7a4a87 (diff)
parent912f1bcbc3d4f9b09695ab784d6985efbc4c9235 (diff)
Merge pull request #2152 from vlakoff/develop
Replace is_null() with === / !== NULL
Diffstat (limited to 'system/libraries/Form_validation.php')
-rw-r--r--system/libraries/Form_validation.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index c405eb6b1..bbd0b523e 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -511,7 +511,7 @@ class CI_Form_validation {
{
foreach ($this->_field_data as $field => $row)
{
- if ( ! is_null($row['postdata']))
+ if ($row['postdata'] !== NULL)
{
if ($row['is_array'] === FALSE)
{
@@ -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) && is_null($postdata))
+ if ( ! in_array('required', $rules) && $postdata === NULL)
{
// 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 (is_null($postdata) && $callback === FALSE)
+ if ($postdata === NULL && $callback === FALSE)
{
if (in_array('isset', $rules, TRUE) OR in_array('required', $rules))
{