* zin: fix php type error in on class.

This commit is contained in:
sunhao
2024-01-29 22:33:02 +08:00
parent 7af94d84a5
commit 5370494517
+3 -1
View File
@@ -58,10 +58,12 @@ class on extends jsCallback
* @param string|null $selector As a delegate event selector.
* @param array $options Event options.
*/
public function __construct(string $event, ?string $selector = null, array $options = array())
public function __construct(string $event, ?string $selector = null, ?array $options = array())
{
parent::__construct('event', 'args');
if(is_null($options)) $options = array();
if(str_contains($event, '__'))
{
list($event, $flags) = explode('__', $event);