pods
pods copied to clipboard
Deprecated: mb_strlen(): Passing null to parameter #1 ($string) of type string is deprecated iin /wp-content/plugins/pods/includes/data.php on line 1548
Description
When creating a new post with a website field, this deprecation warning is being shown:
Also, when I in fact insert an URL, a rogue colon (highlighted in yellow) is inserted after the domain, and a hashtag is appended.
My website field options are per default:
Is that something you can reproduce
Version
3.0.6
Testing Instructions
No response
Screenshots / Screencast
No response
Possible Workaround
Setting the Website field format to "no format" removes the ekstra colon and the hasttag from the backend view.
Site Health Information
PHP 8.1
Pods Package
No response
I'm facing the same deprecation warning, however I'm not getting colons and hashes.
I think I fixed it but am not PHP-savvy enough to make a Pull Request. Passing a Null value instead of string seems to have been deprecated in PHP 8.1 and should be fixed by type casting with (string) in the offending line.
function pods_mb_strlen( $string ) {
if ( function_exists( 'mb_strlen' ) ) {
return mb_strlen( (string) $string );
}