Skip to content

Commit a424d4b

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

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Model/Behavior/UploadBehavior.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ 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
*/
161161
public function afterDelete(EventInterface $event, EntityInterface $entity, ArrayObject $options): bool
162162
{
@@ -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)