mirror of
https://github.com/friendica/friendica
synced 2025-05-02 10:24:22 +02:00
Fix for several fatal errors
This commit is contained in:
parent
08da1ed038
commit
0fdab4ed10
6 changed files with 12 additions and 13 deletions
|
@ -86,8 +86,7 @@ class OEmbed
|
|||
$redirects = 0;
|
||||
$html_text = Network::fetchUrl($embedurl, false, $redirects, 15, 'text/*');
|
||||
if ($html_text) {
|
||||
$dom = new DOMDocument();
|
||||
$dom->loadHTML($html_text);
|
||||
$dom = @DOMDocument::loadHTML($html_text);
|
||||
if ($dom) {
|
||||
$xpath = new DOMXPath($dom);
|
||||
$entries = $xpath->query("//link[@type='application/json+oembed']");
|
||||
|
@ -275,8 +274,7 @@ class OEmbed
|
|||
$html_text = mb_convert_encoding($text, 'HTML-ENTITIES', mb_detect_encoding($text));
|
||||
|
||||
// If it doesn't parse at all, just return the text.
|
||||
$dom = new DOMDocument();
|
||||
$dom->loadHTML($html_text);
|
||||
$dom = @DOMDocument::loadHTML($html_text);
|
||||
if (!$dom) {
|
||||
return $text;
|
||||
}
|
||||
|
|
|
@ -57,9 +57,9 @@ class ContactBlock
|
|||
|
||||
$contacts_title = L10n::t('No contacts');
|
||||
|
||||
if (!$total) {
|
||||
$micropro = [];
|
||||
} else {
|
||||
$micropro = [];
|
||||
|
||||
if ($total) {
|
||||
// Only show followed for personal accounts, followers for pages
|
||||
if (defaults($profile, 'account-type', User::ACCOUNT_TYPE_PERSON) == User::ACCOUNT_TYPE_PERSON) {
|
||||
$rel = [Contact::FOLLOWER, Contact::FRIEND];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue