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]: StatementList and readMetaDataIndex wrong return types #16613

Open
oleghind opened this issue Jun 18, 2024 · 3 comments
Open

[BUG]: StatementList and readMetaDataIndex wrong return types #16613

oleghind opened this issue Jun 18, 2024 · 3 comments
Assignees
Labels
bug A bug report status: unverified Unverified

Comments

@oleghind
Copy link

oleghind commented Jun 18, 2024

final protected function statementList(array! statements, bool extendsMode = false) -> string

It sometimes returns null which leads to the crash:

PHP Fatal error: Phalcon\Mvc\View\Engine\Volt\Compiler::statementList(): Return value must be of type string, null returned

Also similar on the readMetaDataIndex function
PHP Fatal error: Phalcon\Mvc\Model\MetaData::readMetaDataIndex(): Return value must be of type ?array, string returned

@oleghind oleghind added bug A bug report status: unverified Unverified labels Jun 18, 2024
@oleghind oleghind changed the title [BUG]: StatementList wrong return type [BUG]: StatementList and readMetaDataIndex wrong return types Jun 18, 2024
@niden niden self-assigned this Jun 20, 2024
@niden
Copy link
Member

niden commented Jun 20, 2024

@oleghind Could you please offer a test script or the model you are trying to use against the metadata engine? Also any volt files relevant?

At first look it doesn't seem that the statementList returns anything other than a string and the readMetaDataIndex should in theory return ?array but I need to check it against the data you are testing with.

Thanks

@oleghind
Copy link
Author

It's impossible to figure out as errors point to line 0 without any stack traces, so I am closing it

@niden niden reopened this Jun 27, 2024
@niden
Copy link
Member

niden commented Jun 27, 2024

Keep this open. I am curious if we can reproduce it somehow. If I cannot get this reproduced I will close it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug report status: unverified Unverified
Projects
None yet
Development

No branches or pull requests

2 participants