forked from GNUsocial/gnu-social
Merge branch 'testing'
Conflicts: plugins/OStatus/classes/Ostatus_profile.php
This commit is contained in:
@@ -501,8 +501,11 @@ class Ostatus_profile extends Memcached_DataObject
|
||||
} else if ($actor->id) {
|
||||
// We have an ActivityStreams actor with an explicit ID that doesn't match the feed owner.
|
||||
// This isn't what we expect from mainline OStatus person feeds!
|
||||
// Group feeds go down another path, with different validation.
|
||||
throw new Exception("Got an actor '{$actor->title}' ({$actor->id}) on single-user feed for {$this->uri}");
|
||||
// Group feeds go down another path, with different validation...
|
||||
// Most likely this is a plain ol' blog feed of some kind which
|
||||
// doesn't match our expectations. We'll take the entry, but ignore
|
||||
// the <author> info.
|
||||
common_log(LOG_WARNING, "Got an actor '{$actor->title}' ({$actor->id}) on single-user feed for {$this->uri}");
|
||||
} else {
|
||||
// Plain <author> without ActivityStreams actor info.
|
||||
// We'll just ignore this info for now and save the update under the feed's identity.
|
||||
|
@@ -114,9 +114,10 @@ class DiscoveryHints {
|
||||
|
||||
static function _hcard($body, $url)
|
||||
{
|
||||
// DOMDocument::loadHTML may throw warnings on unrecognized elements.
|
||||
// DOMDocument::loadHTML may throw warnings on unrecognized elements,
|
||||
// and notices on unrecognized namespaces.
|
||||
|
||||
$old = error_reporting(error_reporting() & ~E_WARNING);
|
||||
$old = error_reporting(error_reporting() & ~(E_WARNING | E_NOTICE));
|
||||
|
||||
$doc = new DOMDocument();
|
||||
$doc->loadHTML($body);
|
||||
|
@@ -196,8 +196,9 @@ class FeedDiscovery
|
||||
*/
|
||||
function discoverFromHTML($url, $body)
|
||||
{
|
||||
// DOMDocument::loadHTML may throw warnings on unrecognized elements.
|
||||
$old = error_reporting(error_reporting() & ~E_WARNING);
|
||||
// DOMDocument::loadHTML may throw warnings on unrecognized elements,
|
||||
// and notices on unrecognized namespaces.
|
||||
$old = error_reporting(error_reporting() & ~(E_WARNING | E_NOTICE));
|
||||
$dom = new DOMDocument();
|
||||
$ok = $dom->loadHTML($body);
|
||||
error_reporting($old);
|
||||
|
Reference in New Issue
Block a user