From: Zach Copley Date: Thu, 8 Sep 2011 04:45:49 +0000 (-0700) Subject: Fix E_NOTICE from attempt to access undefined array key X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e59b30c14b4406ac070e6e7c9ca6ecbb81bfc57e;p=quix0rs-gnu-social.git Fix E_NOTICE from attempt to access undefined array key --- diff --git a/classes/Managed_DataObject.php b/classes/Managed_DataObject.php index 552d980fba..106065fc46 100644 --- a/classes/Managed_DataObject.php +++ b/classes/Managed_DataObject.php @@ -161,7 +161,9 @@ abstract class Managed_DataObject extends Memcached_DataObject foreach ($table['foreign keys'] as $keyname => $keydef) { if (count($keydef) == 2 && is_string($keydef[0]) && is_array($keydef[1]) && count($keydef[1]) == 1) { - $links[$keydef[1][0]] = $keydef[0].':'.$keydef[1][1]; + if (isset($keydef[1][0])) { + $links[$keydef[1][0]] = $keydef[0].':'.$keydef[1][1]; + } } } return $links;