Partial PHP5 Fix to Rich Boakes “Most Wanted” Plugin
Figured out that if you replace:
MostWanted::mostwanted();
with
$m = new MostWanted();
$m->mostwanted();
It gets rid of the annoying PHP-5 error:
Fatal error: Non-static method MostWanted::mostwanted() cannot be called statically in [...]
The only downside is that for me it lists the top-5 twice, for some reason. Oh, that and when I left a comment with the fix for Rich I managed to miss the leading $ in the second line (which is present above).
NB: I’m using this as the widget version, caveat emptor.


November 5th, 2008 at 8:01 pm
Hello - After upgrading to PHP5, I have tried your fix but it does not work for me.
Previously I had the following call:-
I have replaced it by the following call:-
mostwanted(5,24,false); ?>
I don’t get the error anymore but no list is being displayed.
Any idea?
Thanks