cabrerahector / wordpress-popular-posts

WordPress Popular Posts - A highly customizable WordPress widget that displays your most popular posts.
https://wordpress.org/plugins/wordpress-popular-posts/
GNU General Public License v2.0
279 stars 83 forks source link

WPP_Output fatal error in 4.2.1 #204

Closed dxdc closed 5 years ago

dxdc commented 5 years ago

Upon installing the latest version today, received this version on WP install and plugin content does not load:

This is on latest WP and PHP 5.5.

Reverting to 4.2.0 led to no issue.

PHP Catchable fatal error:  Argument 1 passed to WPP_Output::get_permalink() must be an instance of int, integer given, called in wp-content/plugins/wordpress-popular-posts/includes/class-wordpress-popular-posts-output.php on line 168 and defined in wp-content/plugins/wordpress-popular-posts/includes/class-wordpress-popular-posts-output.php on line 290
cabrerahector commented 5 years ago

Thanks for the report, @dxdc.

Another user at the WordPress.org forum also reported the same issue. Could you please try this (make sure to check the next comment as well) and report back your results?

cabrerahector commented 5 years ago

Nevermind, it's a PHP issue.

PHP version 5 doesn't support scalar type declarations so the proposed fix won't be of much help. I'll need to revert some changes in WPP_Output so it doesn't break on PHP 5.

I'll push a new update in a few minutes.