thecodingmachine/tdbm

TheCodingMachine\TDBM\TDBMService issues from php 7.4

Opened this issue · 5 comments

we are using this package on php 7.4.
I noticed that the server returns 500 error with Notice: Trying to access array offset on value of type bool when I try to delete beans or return ResultIterator to jsonresponse.
This error doesn't always happen, I think this error happens when the bean has many_to_many relationships with other tables.

Hello, could you give us an example of code which create the issue?

I cannot explain the example completely, I think you have access of https://git.thecodingmachine.com/tcm-projects/robin/merge_requests/36 on robin project.
right?

  1. the FileController/getFiles() returns error, so I overwrite the Beans/File/jsonSerialize() to avoid errors temporally.
    The error happens on AbstractFile/jsonSerialize(). line:271~275
  2. the FileController/deleteFile() returns error.

ok I am going to check this

I noticed one thing and I hope this would help you.
Old developer made table name quote, I thought it doesn't make sense so I changed it to quotes.
And then errors were disappeared.
But we have to check package code too.
Because someone could make table name as my old developer.