From: Brion Vibber Date: Mon, 1 Nov 2010 21:31:32 +0000 (-0700) Subject: fix a couple bugs in Managed_DataObject X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=62d47011482373b77ac6715d507ab8913b9280fc;p=quix0rs-gnu-social.git fix a couple bugs in Managed_DataObject --- diff --git a/classes/Managed_DataObject.php b/classes/Managed_DataObject.php index 35d52c5120..7990d7f408 100644 --- a/classes/Managed_DataObject.php +++ b/classes/Managed_DataObject.php @@ -68,7 +68,7 @@ abstract class Managed_DataObject extends Memcached_DataObject function sequenceKey() { - $table = self::schemaDef(); + $table = call_user_func(array(get_class($this), 'schemaDef')); foreach ($table['fields'] as $name => $column) { if ($column['type'] == 'serial') { // We have a serial/autoincrement column. @@ -92,8 +92,7 @@ abstract class Managed_DataObject extends Memcached_DataObject function keyTypes() { - $keys = array(); - $table = self::schemaDef(); + $table = call_user_func(array(get_class($this), 'schemaDef')); if (!empty($table['unique keys'])) { foreach ($table['unique keys'] as $idx => $fields) {