From 74f294e62317c76c2562c1abe1a7ddc5e541cdb3 Mon Sep 17 00:00:00 2001 From: Andreas von Studnitz Date: Mon, 28 Jul 2014 12:06:37 +0200 Subject: [PATCH] Prevent error messages in system.log on invalid feeds --- .../Ikonoshirt/CustomAdminNotifications/Model/Feed.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/code/community/Ikonoshirt/CustomAdminNotifications/Model/Feed.php b/app/code/community/Ikonoshirt/CustomAdminNotifications/Model/Feed.php index f8c66bd..d8b608f 100644 --- a/app/code/community/Ikonoshirt/CustomAdminNotifications/Model/Feed.php +++ b/app/code/community/Ikonoshirt/CustomAdminNotifications/Model/Feed.php @@ -56,8 +56,8 @@ public function checkUpdate() foreach ($feedXml->channel->item as $item) { $feedData[] = array( 'severity' => - (int)isset($item->severity) ? $item->severity - : Mage_AdminNotification_Model_Inbox::SEVERITY_NOTICE, + (int)isset($item->severity) ? $item->severity + : Mage_AdminNotification_Model_Inbox::SEVERITY_NOTICE, 'date_added' => $this->getDate((string)$item->pubDate), 'title' => (string)$item->title, 'description' => (string)$item->description, @@ -130,7 +130,7 @@ public function getFeedData() $curl->close(); try { - $xml = new SimpleXMLElement($data); + $xml = @new SimpleXMLElement($data); } catch (Exception $e) { return false; @@ -138,4 +138,4 @@ public function getFeedData() return $xml; } -} \ No newline at end of file +}