thecodingmachine / tdbm

The Database Machine is a PHP ORM that requires no configuration. The object model is deduced from the database model.
https://thecodingmachine.github.io/tdbm/
119 stars 27 forks source link

TheCodingMachine\TDBM\TDBMService issues from php 7.4 #195

Open viktortro opened 4 years ago

viktortro commented 4 years ago

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.

Kharhamel commented 4 years ago

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

viktortro commented 4 years ago

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?

viktortro commented 4 years ago
  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.
Kharhamel commented 4 years ago

ok I am going to check this

viktortro commented 4 years ago

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.