PHP 8.2 Compatability: htmlspecialchars()
-
Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in wp-includes/formatting.php on line 4715While this is technically an issue with WordPress not being fully compatible with WordPress, there are no checks in this plugin for
nullstrings in themulti-card-template.partial.phpfile. I assume it’s the same problem with the other template too.It makes sense to check if they aren’t null first, so for a quick fix, you could just add a non coalescing echo.
<?php echo ( $review->ReviewerName ) ? esc_textarea( $review->ReviewerName) : ''; ?> <?php echo ( $review->ReviewerType ) ? '(' . esc_textarea( $review->ReviewerType) . ')' : ''; ?>Cheers.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
The topic ‘PHP 8.2 Compatability: htmlspecialchars()’ is closed to new replies.