cphalcon
cphalcon copied to clipboard
[BUG]: Phalcon\Session\Bag cannot be extends
Describe the bug Phalcon\Session\Bag cannot be extends
To Reproduce
class Foo extends Phalcon\Session\Bag
{
}
$foo = new Foo('bar');
Expected behavior After running this code has an error:
Fatal error: Uncaught RuntimeException: Trying to call method set on a non-object Stack trace: #0 [internal function]: Phalcon\Session\Bag->set('name', 'bar') #1 [internal function]: Phalcon\Collection->__set('name', 'bar') #2 test.php(14): Phalcon\Session\Bag->__construct('bar') #3 {main}
Details
- Phalcon version: 4.0.6
- PHP Version: 7.4
- Operating System: Linux Debian
- Installation type: Compiling from source
- Zephir version (if any):
- Server: Nginx
- Other related info (Database, table schema): MariaDB
No problem here with version 4.1.0. Try to upgrade your Phalcon version.
Really it works in 4.1.0. Thank you.