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

Commit f72764e

Browse files
authored
Merge pull request #457 from Gummibeer/patch-2
fire saving event in every case
2 parents 768e155 + 8402cc2 commit f72764e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Translatable/Translatable.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,10 @@ public function save(array $options = [])
241241
} else {
242242
// If $this->exists and not dirty, parent::save() skips saving and returns
243243
// false. So we have to save the translations
244+
if ($this->fireModelEvent('saving') === false) {
245+
return false;
246+
}
247+
244248
if ($saved = $this->saveTranslations()) {
245249
$this->fireModelEvent('saved', false);
246250
$this->fireModelEvent('updated', false);

0 commit comments

Comments
 (0)