Author: NeX
Date: 2010-03-31 20:58:15 +0200 (Wed, 31 Mar 2010)
New Revision: 28931

Modified:
   
plugins/sfApplePushNotificationServicePlugin/trunk/lib/task/apnListenNotificationsQueueTask.class.php
Log:
Validating incoming message info

Modified: 
plugins/sfApplePushNotificationServicePlugin/trunk/lib/task/apnListenNotificationsQueueTask.class.php
===================================================================
--- 
plugins/sfApplePushNotificationServicePlugin/trunk/lib/task/apnListenNotificationsQueueTask.class.php
       2010-03-31 18:34:17 UTC (rev 28930)
+++ 
plugins/sfApplePushNotificationServicePlugin/trunk/lib/task/apnListenNotificationsQueueTask.class.php
       2010-03-31 18:58:15 UTC (rev 28931)
@@ -56,8 +56,15 @@
                }
             if(isset($queue_item['custom_content'])) {
                $apn_connection->customSend($queue_item['token'], 
$queue_item['custom_content']);
+            } elseif(isset($queue_item['message'])) {
+               $apn_connection->send($queue_item['token'], 
$queue_item['message']);
             } else {
-               $apn_connection->send($queue_item['token'], 
$queue_item['message']);
+               echo 'Invalid message format: ';
+               print_r($queue_item);
+               echo "\n";
+                       $queue_connection->disconnect();
+                       $apn_connection->disconnect();
+                       return false;
             }
             $apn_connection->disconnect();
         }

-- 
You received this message because you are subscribed to the Google Groups 
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/symfony-svn?hl=en.

Reply via email to