Resolve silent fatal error on PHP 8
Closed this issue · 5 comments
maxinacube commented
PHP Fatal error: Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array, null given in /.../plugins/courier-notices/src/Model/Courier_Notice/Data.php:474
aaronware commented
@maxinacube do you know how you got that to happen?
aaronware commented
I am pretty sure I have it fixed. But I just wasn't sure how you came across it
maxinacube commented
@aaronware Sorry I don't recall, I just made a quick note when I saw this in the debug.log. I know I was testing for the popup modal when I received this but I will try to replicate and circle back here
aaronware commented
Ok I ended up checking to make sure it wasn't empty
aaronware commented
This actually is resolved for 7.4 as well, it was giving a notice, which was breaking json output in some scenarios