Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Php8, Model bug #15971

Closed
VladKuch opened this issue May 24, 2022 · 1 comment
Closed

[BUG]: Php8, Model bug #15971

VladKuch opened this issue May 24, 2022 · 1 comment
Labels
5.0 The issues we want to solve in the 5.0 release bug A bug report status: medium Medium

Comments

@VladKuch
Copy link
Contributor

VladKuch commented May 24, 2022

Describe the bug
Fatal error: Uncaught TypeError: Phalcon\Mvc\Model\Relation::__construct(): Argument #5 ($options) must be of type array, null given in /var/www/html/phalcon/app/Admin/models/Admin.php:22 Stack trace: #0 [internal function]: Phalcon\Mvc\Model\Relation->__construct(2, 'App\Admin\Model...', 'id', 'admin_id', NULL) #1 [internal function]: Phalcon\Mvc\Model\Manager->addHasMany(Object(App\Admin\Models\Admin), 'id', 'App\Admin\Model...', 'admin_id', NULL) #2

With php7.4 works fine, but with php8.0 parameter options expected array, but null given
To Reproduce

$this->hasMany(
'id',
SomeModel::class,
"ref_id'
);

Screenshots
2022-05-24_17-49-27

Details

  • Phalcon version: v.5.0.3
  • PHP Version: 8.0.19
  • Operating System: Debian
  • Installation type: Compiling from source(Docker compose)
  • Server: Nginx
@VladKuch VladKuch added bug A bug report status: unverified Unverified labels May 24, 2022
@niden niden added status: medium Medium 5.0 The issues we want to solve in the 5.0 release and removed status: unverified Unverified labels May 24, 2022
@niden
Copy link
Member

niden commented May 24, 2022

Resolved in #15969

Thank you @VladKuch

@niden niden closed this as completed May 24, 2022
@niden niden moved this to Implemented in Phalcon v5 Aug 25, 2022
@niden niden added this to Phalcon v5 Aug 25, 2022
@niden niden moved this from Implemented to Released in Phalcon v5 Sep 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5.0 The issues we want to solve in the 5.0 release bug A bug report status: medium Medium
Projects
Archived in project
Development

No branches or pull requests

2 participants