Skip to content
This repository has been archived by the owner on Jun 18, 2019. It is now read-only.

Commit

Permalink
Merge pull request #150 from joshbrw/bugfix/null-locale-upon-attribut…
Browse files Browse the repository at this point in the history
…e-fetch

Fixing getAttribute() not checking null against specific locale
  • Loading branch information
dimsav committed Oct 17, 2015
2 parents b09e100 + 34baecb commit cc93332
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Translatable/Translatable.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public function getAttribute($key)
}

if ($this->isTranslationAttribute($key)) {
if ($this->getTranslation() === null) {
if ($this->getTranslation($locale) === null) {
return;
}

Expand Down

0 comments on commit cc93332

Please sign in to comment.