From: Chuck Hagenbuch Date: Sat, 9 Jan 2010 04:10:07 +0000 (-0500) Subject: Fix a bug when specifying a column as type primaryKey manually X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=ed926f82eed3315f039b12fa474ecbdf71e8a8b6;p=horde.git Fix a bug when specifying a column as type primaryKey manually --- diff --git a/framework/Db/lib/Horde/Db/Adapter/Base/TableDefinition.php b/framework/Db/lib/Horde/Db/Adapter/Base/TableDefinition.php index e27ee1b40..08cf30057 100644 --- a/framework/Db/lib/Horde/Db/Adapter/Base/TableDefinition.php +++ b/framework/Db/lib/Horde/Db/Adapter/Base/TableDefinition.php @@ -81,7 +81,7 @@ class Horde_Db_Adapter_Base_TableDefinition implements ArrayAccess, IteratorAggr * Requests a maximum column length (:string, :text, * :binary or :integer columns only) * * :default: - * The column's default value. You cannot explicitely set the default + * The column's default value. You cannot explicitly set the default * value to +NULL+. Simply leave off this option if you want a +NULL+ * default value. * * :null: @@ -115,7 +115,7 @@ class Horde_Db_Adapter_Base_TableDefinition implements ArrayAccess, IteratorAggr $natives = $this->_native(); $opt = $options; - if (isset($opt['limit']) || isset($natives[$type])) { + if (isset($opt['limit']) || (isset($natives[$type]) && is_array($natives[$type]))) { $nativeLimit = isset($natives[$type]['limit']) ? $natives[$type]['limit'] : null; $column->setLimit(isset($opt['limit']) ? $opt['limit'] : $nativeLimit); }