From b2bab7d7caddd7e57974e07c48663e1422853ebe Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Wed, 6 Jan 2010 23:34:59 -0800 Subject: [PATCH] fixup keytypes so it returns the types no matter what kind of class it is --- classes/Memcached_DataObject.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/classes/Memcached_DataObject.php b/classes/Memcached_DataObject.php index 4e3cc56788..400b05f977 100644 --- a/classes/Memcached_DataObject.php +++ b/classes/Memcached_DataObject.php @@ -194,6 +194,17 @@ class Memcached_DataObject extends DB_DataObject function keyTypes() { + // ini-based classes return number-indexed arrays. handbuilt + // classes return column => keytype. Make this uniform. + + $keys = $this->keys(); + + $keyskeys = array_keys($keys); + + if (is_string($keyskeys[0])) { + return $keys; + } + global $_DB_DATAOBJECT; if (!isset($_DB_DATAOBJECT['INI'][$this->_database][$this->__table."__keys"])) { $this->databaseStructure(); -- 2.39.5