Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: php error when setting repeat event

php error when setting repeat event 12 years 7 months ago #15159

  • ausinterconnect
  • ausinterconnect's Avatar Topic Author
  • Visitor
  • Visitor
Enquiring if anyone else has had an issue when setting repeat events from the same event. We are using Joomla 1.7.1 and DT Register 2.7.9 so all items should be up to date.

We set an event up and it works perfectly as a single instance. In fact the whole system does.

As soon as we set the Repeat to Monthly and the second repeat option to Monthly by weeks as in the below we get a php error which just keeps looping back into itself permanently.

[attachment=0:1683nklp]<!-- ia0 -->dtreg.JPG<!-- ia0 -->[/attachment:1683nklp]

Warning: Invalid argument supplied for foreach() in /home/vmsasqua/public_html/administrator/components/com_dtregister/models/event.php on line 3195

Have looked at the code and it relates directly to setting of the repeat event but I have no idea on php coding. Here is the code as well.

foreach($event as $weekday){

$offset = $weekday - $weekstartday;
$offset = ($offset < 0)?(7 +$offset):$offset;
$totaltime = $currentdate->toUnix(true) + ($dayseconds*($offset)*3600);

if(strtotime(strftime('%Y-%m-%d',$totaltime)) > $startdate->toUnix() && $month == strftime('%m',$totaltime) ){

if($event == 'until'){

if($totaltime < strtotime($event) ){

$repetitions[] = array('dtstart'=>strftime('%Y-%m-%d',$totaltime),'day'=>strftime('%w',$totaltime));

$count ++;

}

}else{

$repetitions[] = array('dtstart'=>strftime('%Y-%m-%d',$totaltime),'day'=>strftime('%w',$totaltime));
$count++;

}

}

}

If anyone has some advice or can steer us in the right direction it would be appreciated.

Regarsd to all

Shane Thorpe
Attachments:

  • Rendering Error in layout Attachment/Item: Property "protected" is not defined. Please enable debug mode for more information.

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.699 seconds