• Resolved corpusprime

    (@corpusprime)


    Hello,
    I am in version 8 of php and I have a problem of character encoding on your plugin that I bought on Themeforest

    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

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Hector Cabrera

    (@hcabrera)

    Hi @corpusprime,

    I’m sorry to say this but the official WordPress Popular Posts plugin is the one you can download for free on ww.wp.xz.cn or from its official GitHub repository. If you got the plugin from somewhere else it certainly didn’t come from me. You’ll need to ask whoever “sold” you a copy of the plugin to provide support for it.

    Note that the official version has been tested with PHP 8 and so far I haven’t seen this error pop up.

    Plugin Author Hector Cabrera

    (@hcabrera)

    By the way, the error seems to be caused by the theme (see line 168 of index.php in /wp-content/themes/emytheme/) and not due to a compatibility issue with PHP 8.

    It seems to me that the theme is not using the wpp_get_mostpopular() function correctly. The developer of the theme (according to the theme’s style.css file that’s you, right?) needs to check that they’re passing the right parameters in the correct format to the function, otherwise this can happen:

    htmlspecialchars(): Argument #1 ($string) must be of type string, array given

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘jQuery.isArray is deprecated; use Array.isArray’ is closed to new replies.