Skip to content

Commit

Permalink
change: php7.4でNoticeが発生するため修正
Browse files Browse the repository at this point in the history
※PHP7.4からスカラー型変数に配列アクセスするとE_NOTICEが出るようなった。
NetCommons3/NetCommons3#1560
  • Loading branch information
s-nakajima committed Mar 14, 2020
1 parent 46919fc commit d130c99
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Model/Behavior/TagBehavior.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,11 @@ public function beforeDelete(Model $Model, $cascade = true) {
* @return void
*/
public function afterDelete(Model $Model) {
$blockId = $this->_deleteTargetData[$Model->alias]['block_id'];
$Tag = $this->_getTagModel();
$Tag->cleanup($Model, $blockId);
if (! empty($this->_deleteTargetData[$Model->alias]['block_id'])) {
$blockId = $this->_deleteTargetData[$Model->alias]['block_id'];
$Tag = $this->_getTagModel();
$Tag->cleanup($Model, $blockId);
}
}

/**
Expand Down

0 comments on commit d130c99

Please sign in to comment.