summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorTaufan Aditya <toopay@taufanaditya.com>2012-03-16 20:19:42 +0100
committerTaufan Aditya <toopay@taufanaditya.com>2012-03-16 20:19:42 +0100
commit865ce1e3a2466259996e52d764650e2144ae10c9 (patch)
treec3be670b973c96ebbc55badfad480eb4a83ad18b /system
parent4e44b344d79b52c7b79489b7e3d137d5ed66ab21 (diff)
Spacing and replace array_key_exists
Diffstat (limited to 'system')
-rw-r--r--system/database/drivers/pdo/pdo_result.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/system/database/drivers/pdo/pdo_result.php b/system/database/drivers/pdo/pdo_result.php
index 213b5d670..6bc923e38 100644
--- a/system/database/drivers/pdo/pdo_result.php
+++ b/system/database/drivers/pdo/pdo_result.php
@@ -162,7 +162,7 @@ class CI_DB_pdo_result extends CI_DB_result {
{
if (strpos($this->result_id->queryString, 'PRAGMA') !== FALSE)
{
- foreach($this->result_array() as $field)
+ foreach ($this->result_array() as $field)
{
preg_match('/([a-zA-Z]+)(\(\d+\))?/', $field['type'], $matches);
@@ -197,7 +197,7 @@ class CI_DB_pdo_result extends CI_DB_result {
else
{
$F->max_length = ($field['len'] > 255) ? NULL : (string) $field['len'];
- $F->primary_key = (int) (array_key_exists('flags', $field) && in_array('primary_key', $field['flags']));
+ $F->primary_key = (int) ( ! empty($field['flags']) && in_array('primary_key', $field['flags']));
}
$data[] = $F;