Fix E_NOTICE from attempt to access undefined array key

This commit is contained in:
Zach Copley 2011-09-07 21:45:49 -07:00
parent 524cabe2c7
commit e59b30c14b

View File

@ -161,9 +161,11 @@ abstract class Managed_DataObject extends Memcached_DataObject
foreach ($table['foreign keys'] as $keyname => $keydef) { foreach ($table['foreign keys'] as $keyname => $keydef) {
if (count($keydef) == 2 && is_string($keydef[0]) && is_array($keydef[1]) && count($keydef[1]) == 1) { if (count($keydef) == 2 && is_string($keydef[0]) && is_array($keydef[1]) && count($keydef[1]) == 1) {
if (isset($keydef[1][0])) {
$links[$keydef[1][0]] = $keydef[0].':'.$keydef[1][1]; $links[$keydef[1][0]] = $keydef[0].':'.$keydef[1][1];
} }
} }
}
return $links; return $links;
} }
} }