diff options
author | Derek Jones <derek.jones@ellislab.com> | 2008-04-03 23:23:13 +0200 |
---|---|---|
committer | Derek Jones <derek.jones@ellislab.com> | 2008-04-03 23:23:13 +0200 |
commit | e97b13635f8985ac88add9659ae6a78e67006b9b (patch) | |
tree | 7a08b481d86fdfb9ed0251631455a270d6ea8598 /system | |
parent | 140786fca98c381cac63beb84c4c2e233ff1090b (diff) |
replaced isset() with array_key_exists() in row() to allow retrieval of individual fields with MySQL NULL values
Diffstat (limited to 'system')
-rw-r--r-- | system/database/DB_result.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/system/database/DB_result.php b/system/database/DB_result.php index 7d5097911..6461431e2 100644 --- a/system/database/DB_result.php +++ b/system/database/DB_result.php @@ -133,7 +133,8 @@ class CI_DB_result { $this->row_data = $this->row_array(0);
}
- if (isset($this->row_data[$n]))
+ // array_key_exists() instead of isset() to allow for MySQL NULL values
+ if (array_key_exists($n, $this->row_data)))
{
return $this->row_data[$n];
}
|