mirror of
https://github.com/friendica/friendica
synced 2025-04-26 11:50:11 +00:00
Avoid HTML parsing of an empty body
This commit is contained in:
parent
3e2fa7867c
commit
5a00902e11
7 changed files with 26 additions and 9 deletions
|
@ -98,7 +98,7 @@ class OEmbed
|
|||
if (!in_array($ext, $noexts)) {
|
||||
// try oembed autodiscovery
|
||||
$html_text = DI::httpRequest()->fetch($embedurl, 15, 'text/*');
|
||||
if ($html_text) {
|
||||
if (!empty($html_text)) {
|
||||
$dom = new DOMDocument();
|
||||
if (@$dom->loadHTML($html_text)) {
|
||||
$xpath = new DOMXPath($dom);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue