Skip to content
Snippets Groups Projects
Commit de179548 authored by Philipp Schüttlöffel's avatar Philipp Schüttlöffel Committed by Jan-Hendrik Willms
Browse files

OpenGraph: surpress warnings when fetching, abort on fail

parent c0033639
No related branches found
No related tags found
No related merge requests found
......@@ -172,7 +172,12 @@ class OpenGraphURL extends SimpleORMap
],
]);
$content = file_get_contents($this['url'], false, $context);
$content = @file_get_contents($this['url'], false, $context);
if ($content === false) {
return;
}
$content = mb_encode_numericentity($content, [0x80, 0xffff, 0, 0xffff], $currentEncoding);
$old_libxml_error = libxml_use_internal_errors(true);
$doc = new DOMDocument();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment