Closed d4mn closed 5 years ago
I tried to look deeper into this and found this article https://wiki.php.net/rfc/consistent_callables First example of problem i think is it
I tested it, is OK. @d4mn
$testEvent = new \App\Libraries\TestEvent();
Events::on('pre_system', [$testEvent, 'hello']);
class TestEvent
{
public function hello()
{
log_message('debug', 'TestEvent hello....');
return true;
}
}
Is it working as expected?
name: Bug report about: Help us improve the framework by reporting bugs!
Describe the bug All these methods:
public static function on($event_name, callable $callback, $priority = EVENT_PRIORITY_NORMAL)
must be of type callable string and array throws an errorCodeIgniter 4 version Codeigniter 4 beta 1
Affected module(s) Events.php
Expected behavior, and steps to reproduce if appropriate method should not be strict checked in functions attribute
Context