Closed as not planned
Description
for ORM checkRules()
Error
Cake\ORM\Table::checkRules(): Return value must be of type bool, null returned
As the signature of that method is:
public function checkRules(...): bool
The code inside checkRules() reads
$event = $this->dispatchEvent(
'Model.afterRules',
compact('entity', 'options', 'result', 'operation')
);
if ($event->isStopped()) {
return $event->getResult();
}
Maybe, to make this less hard to fail, we should allow null as OK value?
return $event->getResult() ?? false;
What do you think?
CakePHP Version
4.4.7
PHP Version
8.1
Seems to also ref #16786