Wrong parameter count in microformats plugin

Creating and modifying plugins.
Post Reply
ChiLyn
Regular
Posts: 10
Joined: Wed Apr 25, 2007 7:32 am

Wrong parameter count in microformats plugin

Post by ChiLyn »

Hi.

I consistently get this error on my entry page:

Warning: Wrong parameter count for range() in

Code: Select all

/home/content/.../serendipity/plugins/serendipity_event_microformats/
serendipity_event_microformats.php on line 249 
and the hreview/hcalendar functions don't work.

Help? :)
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Wrong parameter count in microformats plugin

Post by garvinhicking »

Hi!

Which PHP version are you using? It seems that the microformats plugin requires PHP at least 5.0, because the range() command has added the third option only in that version.

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
mattsches
Regular
Posts: 440
Joined: Sat Nov 05, 2005 9:35 pm
Location: Wiesbaden, Germany
Contact:

Post by mattsches »

Sorry, I was not aware of that. I'm using PHP5 for development, and I'm thinking about restricting this plugin to PHP5 only. Because there are some small issues that can be solved so much easier with PHP5.

In this case, you can try a quick fix and replace line 249 in the mentioned file with this code:

Code: Select all

$ratings    = array('hReview' => range(1.0, $this->get_config('best'));
HTH
- Mattsches
ChiLyn
Regular
Posts: 10
Joined: Wed Apr 25, 2007 7:32 am

Post by ChiLyn »

hmm -- think I am using 4... -- I will try the fix as soon as I can.

Thanks! :)
Post Reply