diff --git a/include/oembed.php b/include/oembed.php
index 426197c5f..ee9e57c3f 100755
--- a/include/oembed.php
+++ b/include/oembed.php
@@ -1,6 +1,6 @@
'',
+ 'title' => t('View PDF'),
+ 'type' => 'pdf'
+ ];
+ // set $txt to something so that we don't attempt to fetch what could be a lengthy pdf.
+ $txt = EMPTY_STR;
+ }
+
if(is_null($txt)) {
$txt = "";
@@ -215,20 +226,10 @@ function oembed_fetch_url($embedurl){
// save in cache
if(! get_config('system','oembed_cache_disable'))
- Zlib\Cache::set('[' . App::$videowidth . '] ' . $furl, $txt);
+ Cache::set('[' . App::$videowidth . '] ' . $furl, $txt);
}
- if(strpos(strtolower($embedurl),'.pdf') !== false) {
- $action = 'allow';
- $j = [
- 'html' => '',
- 'title' => t('View PDF'),
- 'type' => 'pdf'
- ];
-
- }
-
if(! $j) {
$j = json_decode($txt,true);
}