]> git.mxchange.org Git - friendica.git/blobdiff - src/Util/ParseUrl.php
Retrieve local top level parent item separately to check permissions in Model\Item...
[friendica.git] / src / Util / ParseUrl.php
index c3cbda70e3f2f483522ba43fd11de251f8f10648..1596e015bef1415fb1858cd3d45565eaf0dbf1ed 100644 (file)
@@ -175,6 +175,7 @@ class ParseUrl
                        return $siteinfo;
                }
 
+               $header = $curlResult->getHeader();
                $body = $curlResult->getBody();
 
                if ($do_oembed) {
@@ -203,7 +204,7 @@ class ParseUrl
                $charset = '';
                // Look for a charset, first in headers
                // Expected form: Content-Type: text/html; charset=ISO-8859-4
-               if (preg_match('/charset=([a-z0-9-_.\/]+)/i', $curlResult->getContentType(), $matches)) {
+               if (preg_match('/charset=([a-z0-9-_.\/]+)/i', $header, $matches)) {
                        $charset = trim(trim(trim(array_pop($matches)), ';,'));
                }