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]: Mvc\Model::fireEvent(): Return value must be of type bool, null returned #16161

Closed
hellobbq opened this issue Oct 17, 2022 · 3 comments · Fixed by #16162
Closed

[BUG]: Mvc\Model::fireEvent(): Return value must be of type bool, null returned #16161

hellobbq opened this issue Oct 17, 2022 · 3 comments · Fixed by #16162
Assignees
Labels
5.0 The issues we want to solve in the 5.0 release bug A bug report status: medium Medium

Comments

@hellobbq
Copy link

public function fireEvent(string! eventName) -> bool

public function notifyEvent(string! eventName, <ModelInterface> model)
{
var status, behavior, modelsBehaviors, eventsManager,
customEventsManager;
let status = null;

also found:

public function fireEventCancel(string! eventName) -> bool

Details

  • Phalcon version: 5.0.3
  • PHP Version: 8.1.11
  • Operating System: centos
  • Installation type: Compiling from source
  • Zephir version (if any): 0.16.3
  • Server: Nginx
@hellobbq hellobbq added bug A bug report status: unverified Unverified labels Oct 17, 2022
@niden
Copy link
Member

niden commented Oct 17, 2022

Do you have an example model where this message appears? It seems that the notifyEvent could return null but the return type of that method is not set to return only boolean.

@niden
Copy link
Member

niden commented Oct 17, 2022

@hellobbq never mind. I found the issue :)

@niden niden self-assigned this Oct 17, 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 Oct 17, 2022
@niden niden added this to Phalcon v5 Oct 17, 2022
@niden niden moved this to In Progress in Phalcon v5 Oct 17, 2022
@niden niden closed this as completed Oct 17, 2022
Repository owner moved this from In Progress to Implemented in Phalcon v5 Oct 17, 2022
@niden
Copy link
Member

niden commented Oct 17, 2022

Resolved in #16162

@niden niden moved this from Implemented to Released in Phalcon v5 Oct 19, 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

Successfully merging a pull request may close this issue.

2 participants