Hello guys, all right?
So…recently my team need to do a migrate servers, and we had a delicious idea update the PHP, so our PHP is 7.2, but yet was 5.6, and after this changes, the cakephp, show many errors were never was accused, and the principal is below.
My code: $pfProfissoes = $this->PfCalculos->PfProfissoes->find('list', ['valueField' => 'nome']);
And cake return:
Error: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘’ at line 1
The query builded:
SELECT PfProfissoes.id AS PfProfissoes__id, PfProfissoes.nome AS PfProfissoes__nome FROM pf_profissoes PfProfissoes WHERE
Yes, this is the end, and I don’t know where that “Where” comes from.
But before our migrate, this code worked fine, and now not.
My cakephp version is 3.2.13
I have long thought that it would be useful to have a list somewhere of Cake versions and what PHP versions they support. I suppose that’s hard to maintain. 3.2 with 7.2 seems like it might be a problem, there have been others here and elsewhere reporting issues with that combination. Might be worth trying to update Cake to maybe 3.4? I think that’s a pretty straight-forward migration; moving to where middleware is implemented is a bigger change. Or try PHP 7.1?