debug.log
[03-Oct-2024 11:43:43 UTC] PHP Deprecated: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in .../wp-content/plugins/newsletter/includes/module-base.php on line 964
This is the code:
963: static function sanitize_gender($gender) {
964: $gender = trim(strtolower($gender));
965: if (empty($gender)) {
966: return 'n';
967: }
Seems the problem is caused when no gender is used so $gender
is null
before this function call.
Suggested fix: Check for null
in function before using strtolower()
and trim()
.
Newsletter 8.5.2, WordPress 6.3.5, PHP 8.1.x
]]>Warning: strtolower() expects parameter 1 to be string, array given in /home/u458080482/public_html/wp-includes/formatting.php on line 1162
how to get rid of this?
https://www.ads-software.com/plugins/wp-posts-carousel/
]]>When the Ignore case for international languages is not working.
strtolower(…) does not work properly, it is certainly worpress uses UTF-8.
I advise you to change anywhere on
mb_strtolower(…., ‘UTF-8’))
Thanks.
https://www.ads-software.com/plugins/automatic-post-tagger/
]]>As I saw the code and checked several places uses “strtolower”, which is not supported in some asian language like arabic, chinese etc.
So I just found the solutions, If you feel so that I am right please add it to your plugin.
‘mb_convert_case($string, MB_CASE_LOWER, “UTF-8”);’.
Thanks & Regards
Kaleem Ahmad
https://www.ads-software.com/plugins/active-directory-integration/
]]>https://www.ads-software.com/plugins/amazon-s3-and-cloudfront/
]]>Warning: strtolower() expects parameter 1 to be string, array given in /home/mzptv/public_html/wp-includes/formatting.php on line 772
Warning: Cannot modify header information – headers already sent by (output started at /home/mzptv/public_html/wp-includes/formatting.php:772) in /home/mzptv/public_html/wp-includes/pluggable.php on line 934
I’ve done a search and read the other support topics about “Cannot modify header information”, and I’ve tried removing spaces from pluggable.php, formatting.php, header.php and wp-config.php, but the error remains.
Line 772 of formatting.php is —
$key = strtolower( $key );
The line in context is —
function sanitize_key( $key ) {
$raw_key = $key;
$key = strtolower( $key );
$key = preg_replace( '/[^a-z0-9_\-]/', '', $key );
return apply_filters( 'sanitize_key', $key, $raw_key );
}
Let me know if there’s any other code I can drop on paste bin to help fix this. I’m a PHP newb.
]]>Warning: strtolower() expects parameter 1 to be string, array given in /home/mzptv/public_html/wp-includes/formatting.php on line 772
Warning: Cannot modify header information – headers already sent by (output started at /home/mzptv/public_html/wp-includes/formatting.php:772) in /home/mzptv/public_html/wp-includes/pluggable.php on line 934
and read the other support topics about “Cannot modify header information”, and I’ve tried removing spaces from pluggable.php, formatting.php, header.php and wp-config.php, but the error remains.
Line 772 of formatting.php is —
$key = strtolower( $key );
The line in context is —
function sanitize_key( $key ) {
$raw_key = $key;
$key = strtolower( $key );
$key = preg_replace( '/[^a-z0-9_\-]/', '', $key );
return apply_filters( 'sanitize_key', $key, $raw_key );
}
Let me know if there’s any other code I can drop on paste bin to help fix this. I’m a PHP newb.
]]>Keywords display incorrectly when using éèàù?, etc. caracters. i.e “Intégration” translate as “int?gration”.
Edit/modify all_in_one_seo_pack.php, line 717, to use mb_strtolower in place of strtolower:
//FVE ori $small_keywords[] = strtolower($word);
$small_keywords[] = mb_strtolower($word);
Works fine for me;-). Keywords as “Intégration” now correctly display as “intégration”.
]]>I’ve been trying to get my posts’ titles to get converted to lower cases but have had no luck so far. This is what I’m working with:
<?php $s = the_title();
$s = strtolower($s); ?>
<h2>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php echo $s; ?></a></h2>
Am I missing something here (php/wordpress -related)?
Trying to get my categories to print in lowercase in one instance. I’ve tried hacking strtolower()
to this line of code in the theme templates:
<?php the_category(', ') ?>
but can’t get it to work. And I’m not sure if this is the right function to be using.
Any php gurus out there know the answer? If strtolower() will work, how would this look codewise with the above WP php call for the category? Unfortunately, CSS is not going to cut it as I need cats to be low caps even without styles enabled.
Thanks.
]]>