forked from friendica/friendica-addons
attempt to handle one error
This commit is contained in:
parent
a5241698c8
commit
194f987afd
|
@ -639,6 +639,9 @@ function retriever_extract($doc, $retriever) {
|
|||
*/
|
||||
function retriever_globalise_urls($doc, $resource) {
|
||||
$components = parse_url($resource['redirect-url']);
|
||||
if (!array_key_exists('scheme', $components) || !array_key_exists('host', $components) || !array_key_exists('path', $components)) {
|
||||
return $doc;
|
||||
}
|
||||
$rooturl = $components['scheme'] . "://" . $components['host'];
|
||||
$dirurl = $rooturl . dirname($components['path']) . "/";
|
||||
$params = array('$dirurl' => $dirurl, '$rooturl' => $rooturl);
|
||||
|
|
Loading…
Reference in a new issue