Bookmarks: make a soft-requirement of php-curl
This commit is contained in:
parent
cea6561632
commit
4a57728ddd
1 changed files with 4 additions and 1 deletions
|
@ -56,6 +56,9 @@ function getURLMetadata($url) {
|
||||||
}
|
}
|
||||||
$metadata['url'] = $url;
|
$metadata['url'] = $url;
|
||||||
|
|
||||||
|
if (!function_exists('curl_init')){
|
||||||
|
return $metadata;
|
||||||
|
}
|
||||||
$ch = curl_init();
|
$ch = curl_init();
|
||||||
curl_setopt($ch, CURLOPT_URL, $url);
|
curl_setopt($ch, CURLOPT_URL, $url);
|
||||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||||
|
@ -66,4 +69,4 @@ function getURLMetadata($url) {
|
||||||
$metadata['title'] = htmlspecialchars_decode(@$match[1]);
|
$metadata['title'] = htmlspecialchars_decode(@$match[1]);
|
||||||
|
|
||||||
return $metadata;
|
return $metadata;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue