error

DBirthdays module (mod_dbirthdays) shows nearest birthdays (future or past) of your site users.

error

Postby Pascal » Sat May 15, 2010 8:50 pm

Hello,
I have this error when i activate the module.
Parse error: syntax error, unexpected '&', expecting T_VARIABLE or '$' in /xxx/modules/mod_dbirthdays/helper.php on line 103
and nothing appear.

I'm using joomla 1.5, community builder and PHP5.

would you tell me a track?

Thanks

Pascal
 
Posts: 4
Joined: Sat May 15, 2010 8:06 pm

Re: error

Postby Darkick » Sat May 15, 2010 9:05 pm

This strange. Do you realy use PHP5? This construction works in the PHP5 and don't works in PHP4.
For PHP4 you can try to replace code
Code: Select all
            foreach ($list as $key => &$item) {
                if ($cnt >= $max_birthdays) {
                    break;
                }
                if ($item['days_left'] >= 0) {
                    $new_list[$key] = $item;
                    unset($list[$key]);
                    $cnt++;
                }
            }
            $list = array_reverse($list, true);
            foreach ($list as $key => &$item) {
                if ($cnt >= $max_birthdays) {
                    break;
                }
                $new_list[$key] = $item;
                $cnt++;
            } 

with
Code: Select all
            foreach ($list as $key => $item) {
                if ($cnt >= $max_birthdays) {
                    break;
                }
                if ($item['days_left'] >= 0) {
                    $new_list[$key] = $list[$key];
                    unset($list[$key]);
                    $cnt++;
                }
            }
            $list = array_reverse($list, true);
            foreach ($list as $key => $item) {
                if ($cnt >= $max_birthdays) {
                    break;
                }
                $new_list[$key] = $list[$key];
                $cnt++;
            } 

Darkick
 
Posts: 204
Joined: Fri Sep 04, 2009 10:16 pm
Location: Russia, Ekaterinburg

Re: error

Postby Pascal » Sat May 15, 2010 9:22 pm

my apologies.
my accommodation was php4.4. Now it is php5.2.13.
Your module works perfectly
sorry for the inconvenience.

Pascal
 
Posts: 4
Joined: Sat May 15, 2010 8:06 pm


Return to DBirthdays

Who is online

Users browsing this forum: No registered users and 1 guest

cron