[Warning] Invalid argument supplied for foreach()

GET /news-and-events/events/

Line 131 in /websites/vhosts/cedow-st-pauls-moss-vale.solweb.com.au/releases/20231205063630/app/src/extensions/iCalFeedExtension.php

Source

122         }
123 
124         if (!is_a($events, Document::class)) {
125             return new ArrayList();
126         }
127 
128         $populated_uids = [];
129 
130         // Loop through all the events and build an array list of iCalEvents
131         foreach ($events->VEVENT as $key => $event) {
132 //            if (isset($event->uid) && in_array($event->uid, $populated_uids)) {
133 //                 continue;
134 //            }
135 
136             $date_start_utc = $event->dtstart->getDateTime(new \DateTimeZone('Australia/Sydney'));
137             $date_end_utc = new \DateTime($event->dtend, new \DateTimeZone('Australia/Sydney'));

Trace

ERROR [User Warning]: Couldn't set response type to 500 because of output on line 419 of /websites/vhosts/cedow-st-pauls-moss-vale.solweb.com.au/releases/20231205063630/vendor/silverstripe/framework/src/Control/HTTPResponse.php IN GET /news-and-events/events/ Line 397 in /websites/vhosts/cedow-st-pauls-moss-vale.solweb.com.au/releases/20231205063630/vendor/silverstripe/framework/src/Control/HTTPResponse.php Source ====== 388: } elseif ($this->getStatusCode() >= 300) { 389: // It's critical that these status codes are sent; we need to report a failure if not. 390: user_error( 391: sprintf( 392: "Couldn't set response type to %d because of output on line %s of %s", 393: $this->getStatusCode(), 394: $line, 395: $file 396: ), * 397: E_USER_WARNING 398: ); 399: } 400: } 401: 402: /** 403: * Output body of this response to the browser Trace ===== user_error(Couldn't set response type to 500 because of output on line 419 of /websites/vhosts/cedow-st-pauls-moss-vale.solweb.com.au/releases/20231205063630/vendor/silverstripe/framework/src/Control/HTTPResponse.php, 512) HTTPResponse.php:397 SilverStripe\Control\HTTPResponse->outputHeaders() HTTPResponse.php:343 SilverStripe\Control\HTTPResponse->output() index.php:25 Events » St Paul's Moss Vale Skip to content