Skip to content

Commit 551d916

Browse files
committed
Since 5.2.0: Returning a value from event listeners is deprecated. Use instead
1 parent d545ef3 commit 551d916

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Model/Behavior/UploadBehavior.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,9 @@ public function beforeSave(EventInterface $event, EntityInterface $entity, Array
156156
* @param \Cake\Event\EventInterface $event The afterDelete event that was fired
157157
* @param \Cake\Datasource\EntityInterface $entity The entity that was deleted
158158
* @param \ArrayObject $options the options passed to the delete method
159-
* @return bool
159+
* @return void
160160
*/
161-
public function afterDelete(EventInterface $event, EntityInterface $entity, ArrayObject $options): bool
161+
public function afterDelete(EventInterface $event, EntityInterface $entity, ArrayObject $options): void
162162
{
163163
$result = true;
164164

@@ -193,7 +193,7 @@ public function afterDelete(EventInterface $event, EntityInterface $entity, Arra
193193
}
194194
}
195195

196-
return $result;
196+
$event->setResult($result);
197197
}
198198

199199
/**

0 commit comments

Comments
 (0)