PHP 8: Uncaught TypeError: count()
-
Hi there,
it seems you aren’t checking for $review_criteria being an array here:
/wp-content/plugins/reviewx/partials/storefront/myaccount/add-review.php:197
You did so in line 52. I guess something like the following could work to fix this error:
<input type="hidden" name="rx-total-criteria" id="rx-total-criteria" value="<?php echo ( is_array( $review_criteria ) ) ? count( $review_criteria ) : 0; ?>">
Since PHP 8 count() throws a TypeError. For us it’s breaking the order page in my account (WooCommerce).
Best,
Marc
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘PHP 8: Uncaught TypeError: count()’ is closed to new replies.