phalcon / cphalcon

High performance, full-stack PHP framework delivered as a C extension.
https://phalcon.io
BSD 3-Clause "New" or "Revised" License
10.78k stars 1.97k forks source link

[BUG]: Dispacher: Exception on nullable module value (PHP 8.1) #15997

Closed palcoder closed 2 years ago

palcoder commented 2 years ago

Hello,

The dispatcher will throw the following exception when you pass a null value for the module parameter in route but when you pass an empty string it works fine.

Phalcon\Dispatcher\AbstractDispatcher::setModuleName(): Passing null to parameter #1 ($moduleName) of type string is deprecated

$router->add( '/session', [ 'module' => null, 'controller' => 'session', 'action' => 'index' ] );

niden commented 2 years ago

Resolved in https://github.com/phalcon/cphalcon/pull/16009