I got this problem.
I could only fix the problem by changing
$parsed = [];
to
$parsed = '[]';
in the “Print CSS for extraction by Critical CSS generator” in optimization.class.php
I’m not sure if this was because my setup is different, but my fix worked for me ??