git.gnu.io has moved to IP address 209.51.188.249 -- please double check where you are logging in.

Commit e59b30c1 authored by Zach Copley's avatar Zach Copley

Fix E_NOTICE from attempt to access undefined array key

parent 524cabe2
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment