]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/GroupPrivateMessage/actions/showgroupmessage.php
Merge remote-tracking branch 'upstream/master' into social-master
[quix0rs-gnu-social.git] / plugins / GroupPrivateMessage / actions / showgroupmessage.php
index 8b99ece2758347fb812cedf60111209aabb6d2a0..0c4d1342a9aa463db3703898b6dcd439bd6eda2a 100644 (file)
@@ -146,7 +146,7 @@ class ShowgroupmessageAction extends Action
      *
      * @return boolean is read only action?
      */
-    function isReadOnly($args)
+    function isReadOnly(array $args=array())
     {
         return true;
     }
@@ -174,9 +174,12 @@ class ShowgroupmessageAction extends Action
      */
     function etag()
     {
-        $avatar = $this->sender->getAvatar(AVATAR_STREAM_SIZE);
-
-        $avtime = ($avatar) ? strtotime($avatar->modified) : 0;
+        try {
+            $avatar = $this->sender->getAvatar(AVATAR_STREAM_SIZE);
+            $avtime = strtotime($avatar->modified);
+        } catch (Exception $e) {
+            $avtime = 0;
+        }
 
         return 'W/"' . implode(':', array($this->arg('action'),
                                           common_user_cache_hash(),