]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
invalid mbox_sha1sum in the case where users don't have an email address
authorJames Walker <walkah@walkah.net>
Tue, 18 May 2010 14:09:16 +0000 (10:09 -0400)
committerJames Walker <walkah@walkah.net>
Tue, 18 May 2010 14:09:16 +0000 (10:09 -0400)
(reported by pedantic-web.org)

actions/foaf.php

index 9cb65a885624a56e6b304e5e852ad8b7ef88f242..2f054de0c9f73885fafbb49e00e7808ca2cd9e29 100644 (file)
@@ -95,7 +95,9 @@ class FoafAction extends Action
         // Would be nice to tell if they were a Person or not (e.g. a #person usertag?)
         $this->elementStart('Agent', array('rdf:about' =>
                                              $this->user->uri));
-        $this->element('mbox_sha1sum', null, sha1('mailto:' . $this->user->email));
+        if ($this->user->email) {
+            $this->element('mbox_sha1sum', null, sha1('mailto:' . $this->user->email));
+        }
         if ($this->profile->fullname) {
             $this->element('name', null, $this->profile->fullname);
         }