polylang / dynamo

Improves the WordPress translations performance
GNU General Public License v2.0
6 stars 1 forks source link

Ensure that $plural_expression is always a string #25

Closed Chouby closed 1 year ago

Chouby commented 1 year ago

Since #24, the plural expression may be undefined. This PR ensures that this is always a string (possibly empty) to avoid a deprecated notice in PHP 8.1.

PHP Deprecated:  strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /home/travis/build/polylang/dynamo/tmp/wordpress/wp-includes/pomo/plural-forms.php on line 101