debug.log
when in UpdraftPlus backend:
[05-Feb-2024 20:51:47 UTC] PHP Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in ../wp-content/plugins/updraftplus/templates/wp-admin/advanced/site-info.php on line 67
Reason is result of $wpdb->get_var('SELECT @@GLOBAL.sql_mode')
can be null
depending on server setup and is passed to htmlspecialchars()
without checking content of result.
67: $updraftplus_admin->settings_debugrow(__('Current SQL mode:', 'updraftplus'), htmlspecialchars($wpdb->get_var('SELECT @@GLOBAL.sql_mode')));
UpdraftPlus 1.23.16, WordPress 6.4.3, PHP 8.1.x
]]><div class=""floating-paragraph-container"">
<figure class=""floating-paragraph-figure" float-left="" pr-3"="" id=""iavkk"" data-src=""https://cms.transmatico.com/storage/pdfs/174181/extracted/img-002.png""><img class="lazy error" src=""https://cms.transmatico.com/storage/pdfs/174181/extracted/img-002.png"" data-src=""https://cms.transmatico.com/storage/pdfs/174181/extracted/img-002.png"" alt=""Foto:" privat"="" data-was-processed="true"><figcaption id=""iaw9w"">Foto: privat</figcaption></figure>
</div>
As you can see in the example extra quote marks are added in my html atributes on import. For our export we are using htmlspecialchars() so the xml is builded correctly and the issue appears after import with the plugin. So is there an option to add in the import hook htmlentities so all characters can be supported in the html?
]]>Sincerely,
Olivier
Uncaught TypeError: htmlspecialchars(): Argument #1 ($string) must be of type string, array given in /homepages/44/d582119578/htdocs/preprod/wp-content/plugins/wordpress-popular-posts/src/template-tags.php:162 Stack trace: #0 /homepages/44/d582119578/htdocs/preprod/wp-content/plugins/wordpress-popular-posts/src/template-tags.php(162): htmlspecialchars(Array, 3, 'UTF-8', false) #1 /homepages/44/d582119578/htdocs/preprod/wp-content/themes/emytheme/index.php(168): wpp_get_mostpopular(Array) #2 /homepages/44/d582119578/htdocs/preprod/wp-includes/template-loader.php(106): include('/homepages/44/d...') #3 /homepages/44/d582119578/htdocs/preprod/wp-blog-header.php(19): require_once('/homepages/44/d...') #4 /homepages/44/d582119578/htdocs/preprod/index.php(17): require('/homepages/44/d...') #5 {main} thrown in /homepages/44/d582119578/htdocs/preprod/wp-content/plugins/wordpress-popular-posts/src/template-tags.php on line 162
PHP Warning: htmlspecialchars() expects parameter 1 to be string, array given in ../name-directory/shortcode.php on line 317
Any idea for a fix?
]]>I’m getting this on my error_log , on every request so it’s going higher on error_log mb.
PHP Warning: htmlspecialchars(): charset `UTF-8;’ not supported, assuming utf-8 in /home/*****/public_html/wp-content/plugins/wp-seopress/inc/functions/options-social.php on line 355
341 to 356;
//OG URL
function seopress_social_facebook_og_url_hook() {
if (seopress_social_facebook_og_option() ==’1′) {
global $wp;
if (seopress_advanced_advanced_trailingslash_option()) {
$current_url = home_url(add_query_arg(array(), $wp->request));
} else {
$current_url = trailingslashit(home_url(add_query_arg(array(), $wp->request)));
}
if (is_search()) {
$seopress_social_og_url = ‘<meta property=”og:url” content=”‘.get_home_url().’/search/’.get_search_query().'” />’;
} else {
$seopress_social_og_url = ‘<meta property=”og:url” content=”‘.htmlspecialchars($current_url).'” />’;
}
Report number: XHERULFY
PHP Warning: htmlspecialchars(): charset `UTF-8;’ not supported, assuming utf-8 in /home/*********/public_html/wp-content/plugins/litespeed-cache/inc/utility.class.php on line 586
574 to 590 below;
if ( $type ) {
// Remove potential param type
from url
$url = parse_url( htmlspecialchars_decode( $url ) ) ;
parse_str( $url[ ‘query’ ], $query ) ;
$built_arr = array_merge( $query, LiteSpeed_Cache_Router::build_type( $type ) ) ;
if ( $append_arr ) {
$built_arr = array_merge( $built_arr, $append_arr ) ;
}
$url[ ‘query’ ] = http_build_query( $built_arr ) ;
self::compatibility() ;
$url = http_build_url( $url ) ;
$url = htmlspecialchars( $url ) ;
}
return $url ;
}
$description = htmlspecialchars ( wp_strip_all_tags( $post->post_content ), ENT_QUOTES, 'utf-8', false );
$location_tmp_output .= ( !empty($venue) ? ' "name": "'.htmlspecialchars( $venue, ENT_QUOTES, 'utf-8', false ).'",' : '' );
otherwise double quotes within the both fields description and venue will break the ld+json string
]]>Warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/content/69/6454569/html/IMARRIEDTHEWAR/wp-includes/formatting.php on line 3582
I have deactivated all plug-ins to no effect. I suspect I need to add or delete something in formatting.php. My friend has not made any changes to that file (nor would he know where to find it), so I suspect it’s either an installation issue or a coding issue in formatting.php.
He is hosting with Godaddy, and there was an issue earlier that he said only Godaddy tech support could resolve. This leads me to think it might be an installation issue, but any assistance will be appreciated.
Thank you.
]]>Warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/content/69/6454569/html/IMARRIEDTHEWAR/wp-includes/formatting.php on line 3582
I cannot locate the wp-includes/formatting.php file in the editor. Where can I find this file and how can I remove the warning?
Or is this possibly an issue that needs to be solved with the WordPress host?
Thank you.
]]>