The Musings of Chris Samuel

The Musings of Chris Samuel

The Thoughts and Feelings of a Melbourne Person

The Musings of Chris Samuel RSS Feed
 
 
 
 

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.

RSS 2.0 feed • Leave a response, or trackback

One Response to “Partial PHP5 Fix to Rich Boakes “Most Wanted” Plugin”

  1. 1
    David:

    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

Leave a Reply

Related Posts

Music

Spam Blocked

RSS ABC News

Blogroll

People

Sites

Recent Posts

Random Image

 
dsc 0060
 

Categories

Archives

Meta

Creative Commons Attribution-NonCommercial-ShareAlike 2.5 Australia
Creative Commons Attribution-NonCommercial-ShareAlike 2.5 Australia