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]: Volt Compiler throws RuntimeException - container related #15842

Closed
niden opened this issue Dec 28, 2021 · 1 comment · Fixed by #15843
Closed

[BUG]: Volt Compiler throws RuntimeException - container related #15842

niden opened this issue Dec 28, 2021 · 1 comment · Fixed by #15843
Assignees
Labels
5.0 The issues we want to solve in the 5.0 release bug A bug report status: medium Medium

Comments

@niden
Copy link
Sponsor Member

niden commented Dec 28, 2021

When registering a custom function for Volt, there is an error thrown:

Trying to call method "has" on an non object

The issue appears when there is no container injected in Volt and as such line 1881:

if true === this->container->has("tag") {

throws the error. It should be changed to:

if typeof this->container == "object" && this->container->has("tag") {

@niden niden added bug A bug report status: unverified Unverified labels Dec 28, 2021
@niden niden self-assigned this Dec 28, 2021
@niden niden added 5.0 The issues we want to solve in the 5.0 release status: medium Medium and removed status: unverified Unverified labels Dec 28, 2021
@niden niden added this to Working on it in Phalcon Roadmap Dec 28, 2021
@niden niden mentioned this issue Dec 28, 2021
5 tasks
@niden niden linked a pull request Dec 28, 2021 that will close this issue
5 tasks
@niden
Copy link
Sponsor Member Author

niden commented Dec 28, 2021

Resolved in #15843

@niden niden closed this as completed Dec 28, 2021
Phalcon Roadmap automation moved this from Working on it to Implemented Dec 28, 2021
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
Phalcon Roadmap
  
Implemented
Development

Successfully merging a pull request may close this issue.

1 participant