The error you may get with PHP 7.4+:
"Trying to access array offset on value of type null"
May have to do with attempting to insert a result that contains no data.
Either make sure what you are inserting is not null or in the database make the field null.