summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-01-26 13:15:53 +0100
committerAndrey Andreev <narf@bofh.bg>2012-01-26 13:15:53 +0100
commit79f675446b29a0006ea090ed03ed721fb18c5dc5 (patch)
treef1add3ad63359716d78466cb665fa275b534d140
parentcb9f361feb5f60191fc14a19f23aa0ba2bf91c37 (diff)
Replace array_key_exists() with isset()
-rw-r--r--system/database/drivers/sqlite3/sqlite3_forge.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/system/database/drivers/sqlite3/sqlite3_forge.php b/system/database/drivers/sqlite3/sqlite3_forge.php
index 6398e48cd..43f08ed7a 100644
--- a/system/database/drivers/sqlite3/sqlite3_forge.php
+++ b/system/database/drivers/sqlite3/sqlite3_forge.php
@@ -113,11 +113,11 @@ class CI_DB_sqlite3_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