aboutsummaryrefslogtreecommitdiffstats
path: root/unshorturl/unshorturl.php
diff options
context:
space:
mode:
Diffstat (limited to 'unshorturl/unshorturl.php')
-rw-r--r--unshorturl/unshorturl.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/unshorturl/unshorturl.php b/unshorturl/unshorturl.php
index f172b08..6340e9a 100644
--- a/unshorturl/unshorturl.php
+++ b/unshorturl/unshorturl.php
@@ -33,10 +33,12 @@ function unshorturl_get_long_url($shorturl) {
if ($res !== false) {
$matches = [];
- if (preg_match('/^Location: (.*)$/', $res, $matches)) {
+ if (preg_match('/^(?:L|l)ocation: (.*)$/m', $res, $matches)) {
return $matches[1];
}
}
+
+ return false;
}
function unshorturl_prepare_body(&$body) {