Skip to content
This repository has been archived by the owner on Jul 1, 2022. It is now read-only.

Commit

Permalink
Small refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Alban Jubert committed Aug 7, 2018
1 parent 4ef6c60 commit 5e2fe79
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/SaveRelationsBehavior.php
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,7 @@ public function beforeDelete()
$owner = $this->owner;
foreach ($this->_relationsCascadeDelete as $relationName => $params) {
if ($params === true) {
/** @var ActiveQuery $relation */
$relation = $owner->getRelation($relationName);
if (!empty($owner->{$relationName})) {
if ($relation->multiple === true) { // Has many relation
Expand Down

0 comments on commit 5e2fe79

Please sign in to comment.