From: James Walker Date: Tue, 18 May 2010 14:09:16 +0000 (-0400) Subject: invalid mbox_sha1sum in the case where users don't have an email address X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=6da59fab58b3f517a9e48204faa4f29ceabc4ba9;p=quix0rs-gnu-social.git invalid mbox_sha1sum in the case where users don't have an email address (reported by pedantic-web.org) --- diff --git a/actions/foaf.php b/actions/foaf.php index 9cb65a8856..2f054de0c9 100644 --- a/actions/foaf.php +++ b/actions/foaf.php @@ -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); }