Looping through an array where each item is labeled "policy". There's a conditional to check that specific rules are met within each policy. If the conditional passes, I'm "adding a record" using the now "policy" as the reference for all the data. But this is where the debugger stops and throws the following error: "array_key_exists(): Argument #2 ($array) must be of type array, null given"
None of the fields I'm referencing are an array, nor are any of the fields I'm creating in the database an array. The variable being referenced is an object. There's nothing I can see that should be causing this. Any ideas?