Skip to content

Instantly share code, notes, and snippets.

@wms

wms/-

Created May 28, 2014 16:13
Show Gist options
  • Save wms/3079997c765835eec475 to your computer and use it in GitHub Desktop.
Save wms/3079997c765835eec475 to your computer and use it in GitHub Desktop.
diff --git a/data/model/Relationship.php b/data/model/Relationship.php
index 0e9c184..77619a5 100644
--- a/data/model/Relationship.php
+++ b/data/model/Relationship.php
@@ -208,7 +208,7 @@ class Relationship extends \lithium\core\Object {
$conditions = (array) $this->constraints();
foreach ($this->key() as $from => $to) {
- if (!isset($object->{$from})) {
+ if ($object->{$from} === null) {
return null;
}
$conditions[$to] = $object->{$from};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment