linchpin/courier-notices

Resolve silent fatal error on PHP 8

Closed this issue · 5 comments

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

@maxinacube do you know how you got that to happen?

I am pretty sure I have it fixed. But I just wasn't sure how you came across it

@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

Ok I ended up checking to make sure it wasn't empty

This actually is resolved for 7.4 as well, it was giving a notice, which was breaking json output in some scenarios