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.
Since PHP 7.4 this seems to be explicit and error message will abound if you don't give a reference statement for variables.
We rest Trying To Access Array Offset On Value Of Type Null to share philosophy from past times:
Today is: 29th May (GMT), in history on the 29th of May, 1975 AD the following birth happened:
Bianca Langham: Australian field hockey fullback / halfback (1996 Olympics)