diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-01-26 13:14:02 +0100 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-01-26 13:14:02 +0100 |
commit | 20ebf1459b6dc1449a545156b70e7cb2932fa9eb (patch) | |
tree | a06d672fa0bda2646edc721513069710ee5e61f5 /system/database | |
parent | d90387867fbc8e1d10058cf65805a7ae5c8cbaeb (diff) |
Replace array_key_exists() with isset() and ! empty()
Diffstat (limited to 'system/database')
-rw-r--r-- | system/database/drivers/sqlite/sqlite_forge.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/system/database/drivers/sqlite/sqlite_forge.php b/system/database/drivers/sqlite/sqlite_forge.php index 8bf1f2595..5339f6e3e 100644 --- a/system/database/drivers/sqlite/sqlite_forge.php +++ b/system/database/drivers/sqlite/sqlite_forge.php @@ -104,11 +104,11 @@ class CI_DB_sqlite_forge extends CI_DB_forge { $sql .= "\n\t".$this->db->protect_identifiers($field) .' '.$attributes['TYPE'] - .(array_key_exists('CONSTRAINT', $attributes) ? '('.$attributes['CONSTRAINT'].')' : '') - .((array_key_exists('UNSIGNED', $attributes) && $attributes['UNSIGNED'] === TRUE) ? ' UNSIGNED' : '') - .(array_key_exists('DEFAULT', $attributes) ? ' DEFAULT \''.$attributes['DEFAULT'].'\'' : '') - .((array_key_exists('NULL', $attributes) && $attributes['NULL'] === TRUE) ? ' NULL' : ' NOT NULL') - .((array_key_exists('AUTO_INCREMENT', $attributes) && $attributes['AUTO_INCREMENT'] === TRUE) ? ' AUTO_INCREMENT' : ''); + .(isset($attributes['CONSTRAINT']) ? '('.$attributes['CONSTRAINT'].')' : '') + .((isset($attributes['UNSIGNED']) && $attributes['UNSIGNED'] === TRUE) ? ' UNSIGNED' : '') + .(isset($attributes['DEFAULT']) ? ' DEFAULT \''.$attributes['DEFAULT'].'\'' : '') + .((isset($attributes['NULL']) && $attributes['NULL'] === TRUE) ? ' NULL' : ' NOT NULL') + .((isset($attributes['AUTO_INCREMENT']) && $attributes['AUTO_INCREMENT'] === TRUE) ? ' AUTO_INCREMENT' : ''); } // don't add a comma on the end of the last field |