Skip to content
Snippets Groups Projects
Commit 8f8b521a authored by Kevin Abel's avatar Kevin Abel
Browse files

Fix syntax to be 5.3 safe

Dereferencing the new operator is only 5.4 ready.
parent bf3eedd5
No related branches found
No related tags found
No related merge requests found
......@@ -14,10 +14,13 @@ function getCAPData()
$isTest = true;
}
$pubDate = (string) $item->children('dc', true)->date;
$pubDateTime = new DateTime($pubDate);
$output = array(
'identifier' => md5((string) $item->children('dc', true)->date),
'identifier' => md5($pubDate),
'sender' => 'police.unl.edu',
'sent' => (new DateTime((string) $item->children('dc', true)->date))->format(DateTime::ATOM),
'sent' => $pubDateTime->format(DateTime::ATOM),
'status' => $isTest ? 'Test' : 'Actual',
'msgType' => 'Alert',
'scope' => 'Public',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment