PHP Warning: Cannot use string as array in class-wpo-cache-rules.php on line 24
-
Full error message: PHP Warning: Cannot use string as array in D:\wwwroot\xaxaxa\wp-content\plugins\wp-optimize\cache\class-wpo-cache-rules.php on line 242
WP Optimize version: 4.6.0
WordPress version: 7.0.2
On the line 240 – 242:// delete all archive pages for post.
$post_date = get_post_time('Y-m-j', false, $post_id);
list($year, $month, $day) = $post_date;Since
get_post_type()is return string, int, false ( https://developer.wordpress.org/reference/functions/get_post_time/ ). So, this code should never work even on old or new PHP. Tested with PHP 7.0 with the code below, all returnsnull.list($a, $b, $c) = 'ada baa caa';
var_dump($a, $b, $c);// null null nullI have no idea when this error/warning occurs.
You must be logged in to reply to this topic.