• I’ve noticed the following error appearing quite regularly in my php errors log.

    Is it a problem? Are you able to resolve?

    PHP Warning: strip_tags() expects parameter 1 to be string, array given in /<snip>/wp-content/plugins/wp-power-stats/wp-power-stats.php on line 609

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author artifex404

    (@artifex404)

    PHP warning usually are not show stoppers, but I will fix that in the next version. Thanks for reporting this!

    Thread Starter rvry

    (@rvry)

    The php warnings are still appearing after updating ??

    • This reply was modified 6 years, 8 months ago by rvry.
    Thread Starter rvry

    (@rvry)

    It might be because of this line in wp-power-stats.php : 276

    It’s checking if $data[‘search_engine’] is an array and if it is then it’s passing it to sanitize_data, which is expecting a string in strip_tags and not an array.

    Could this also be why search keywords never appear in the statistics overview box?

    // Get search engine keywords
    self::$data[‘keywords’] = (is_array(self::$data[‘search_engine’])) ? self::sanitize_data(self::$data[‘search_engine’][‘keywords’]) : “”;

    Plugin Author artifex404

    (@artifex404)

    Thanks for reporting! I’ll try to catch those notices.

    The search keywords missing is due to Google now going fully to the https protocol. The https protocol does not send the keywords to the site in the referrer. Have to think if there’s a workaround for this.

    Hello ??

    Yes, this warning is polluting error log on the server.

    PHP Warning: strip_tags() expects parameter 1 to be string, array given in /public/wp-content/plugins/wp-power-stats/wp-power-stats.php on line 605

    I believe simple type check should do the trick there.

    Thanks for your nice plugin!

    • This reply was modified 6 years, 6 months ago by Air..
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘PHP Warning: strip_tags() error’ is closed to new replies.