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

[NFR]: Return value of Phalcon\Db\Adapter\AbstractAdapter::getSqlVariables() must be of the type array, null returned" #15637

Closed
alian001 opened this issue Aug 27, 2021 · 4 comments · Fixed by #15750
Assignees
Labels
5.0 The issues we want to solve in the 5.0 release breaks bc Functionality that breaks Backwards Compatibility bug A bug report status: medium Medium

Comments

@alian001
Copy link

[27-Aug-2021 19:35:11] WARNING: [pool www] child 24604 said into stderr: "NOTICE: PHP message: PHP Fatal error: Return value of Phalcon\Db\Adapter\AbstractAdapter::getSqlVariables() must be of the type array, null returned in Unknown on line 0"
[27-Aug-2021 19:35:11] WARNING: [pool www] child 24604 said into stderr: "Unknown(0) : Fatal error - Return value of Phalcon\Db\Adapter\AbstractAdapter::getSqlVariables() must be of the type array, null returned"
[27-Aug-2021 19:35:14] WARNING: [pool www] child 24605 said into stderr: "NOTICE: PHP message: PHP Fatal error: Return value of Phalcon\Db\Adapter\AbstractAdapter::getSqlVariables() must be of the type array, null returned in Unknown on line 0"
[27-Aug-2021 19:35:14] WARNING: [pool www] child 24605 said into stderr: "Unknown(0) : Fatal error - Return value of Phalcon\Db\Adapter\AbstractAdapter::getSqlVariables() must be of the type array, null returned"
[27-Aug-2021 19:35:23] WARNING: [pool www] child 24607 said into stderr: "NOTICE: PHP message: PHP Fatal error: Return value of Phalcon\Db\Adapter\AbstractAdapter::getSqlVariables() must be of the type array, null returned in Unknown on line 0"
[27-Aug-2021 19:35:23] WARNING: [pool www] child 24607 said into stderr: "Unknown(0) : Fatal error - Return value of Phalcon\Db\Adapter\AbstractAdapter::getSqlVariables() must be of the type array, null returned"

the verison is cphalcon-4.1.2

my php verison is php7.4.22, osversion is ceonts7.6,when i run the php, has the error,

psr version is
php --ri psr
psr
Version => 1.0.1
Released => 2020-11-12
Authors => John Boehr jbboehr@gmail.com (lead)
PSR-3 Log Version => 1.0.0
PSR-6 Cache Version => 1.0.0
PSR-7 Http Message Version => 1.0.0
PSR-11 Container Version => 1.0.0
PSR-13 Link Version => 1.0.0
PSR-14 Event Dispatcher => 1.0.0
PSR-15 HTTP Handlers (Server Handler) => 1.0.0
PSR-15 HTTP Handlers (Middleware) => 1.0.0
PSR-16 Simple Cache Version => 1.0.0
PSR-17 HTTP Factories => 1.0.0
PSR-18 HTTP Client => 1.0.0

i do not know ,why is this error,
who can help me,

@alian001 alian001 added the new feature request Planned Feature or New Feature Request label Aug 27, 2021
@Jeckerson Jeckerson added bug A bug report and removed new feature request Planned Feature or New Feature Request labels Aug 27, 2021
@Jeckerson
Copy link
Member

Could you provide code example?

@Jeckerson Jeckerson added the need script to reproduce Script is required to reproduce the issue label Aug 27, 2021
@ruibin
Copy link

ruibin commented Aug 28, 2021

I found this bug too! My php version is 7.4 and phalcon version is 4.1.2.

The reason is Phalcon\Db\Adapter\Pdo\Mysql extends Phalcon\Db\Adapter\AbstractAdapter and getSqlVariables() has no return type declare. But the parent method has array return type define.

class method rewriting must be the same return type as parent method.

@Jeckerson
Copy link
Member

@alian001 How did you install Phalcon?

@niden niden added 5.0 The issues we want to solve in the 5.0 release status: medium Medium and removed need script to reproduce Script is required to reproduce the issue labels Oct 31, 2021
@niden niden self-assigned this Oct 31, 2021
@niden niden added this to Working on it in Phalcon Roadmap Oct 31, 2021
@niden niden added the breaks bc Functionality that breaks Backwards Compatibility label Oct 31, 2021
@niden niden mentioned this issue Oct 31, 2021
5 tasks
@niden niden linked a pull request Oct 31, 2021 that will close this issue
5 tasks
@niden
Copy link
Sponsor Member

niden commented Nov 1, 2021

Resolved in #15750

Thank you @alian001

@niden niden closed this as completed Nov 1, 2021
Phalcon Roadmap automation moved this from Working on it to Implemented Nov 1, 2021
@niden niden moved this from Implemented to Released in Phalcon Roadmap Nov 16, 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 breaks bc Functionality that breaks Backwards Compatibility bug A bug report status: medium Medium
Projects
Archived in project
Phalcon Roadmap
  
Released
Development

Successfully merging a pull request may close this issue.

4 participants