Skip to content

Commit

Permalink
Merge pull request #10 from chrometoasters/fix/variable-const-names
Browse files Browse the repository at this point in the history
Fix letter case
  • Loading branch information
stevie-mayhew authored Apr 11, 2018
2 parents cf9cf6a + 7bdd4e1 commit 0eb20a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/DataObjectExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function onBeforeWrite()
}

$value = (string)$value['after'];
list($hasone, $key) = explode(self::separator, $name, 2);
list($hasone, $key) = explode(self::SEPARATOR, $name, 2);
if($this->owner->has_one($hasone) || $this->owner->belongs_to($hasone)) {
$rel = $this->owner->getComponent($hasone);

Expand All @@ -36,7 +36,7 @@ public function onBeforeWrite()

if ($original !== $value) {
$rel->setCastedField($key, $value);
$toWrite[$hasOne] = $rel;
$toWrite[$hasone] = $rel;
}
}
}
Expand Down

0 comments on commit 0eb20a1

Please sign in to comment.