aboutsummaryrefslogtreecommitdiffstats
path: root/unshorturl/unshorturl.php
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2021-07-10 17:50:10 +0200
committerHarald Eilertsen <haraldei@anduin.net>2021-07-10 17:50:10 +0200
commit3c1ff667a8fb7f177234f44e0d742da66e463669 (patch)
tree3fc714e16fd8b9fb881c70c2b2f965e8e2978d58 /unshorturl/unshorturl.php
parent28ea8829a07db685d4d016e1bdd3f320b73e9add (diff)
downloadvolse-hz-addons-3c1ff667a8fb7f177234f44e0d742da66e463669.tar.gz
volse-hz-addons-3c1ff667a8fb7f177234f44e0d742da66e463669.tar.bz2
volse-hz-addons-3c1ff667a8fb7f177234f44e0d742da66e463669.zip
unshorturl: And do the actual replacement + typo
Diffstat (limited to 'unshorturl/unshorturl.php')
-rw-r--r--unshorturl/unshorturl.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/unshorturl/unshorturl.php b/unshorturl/unshorturl.php
index 70d7cf6..e8c747a 100644
--- a/unshorturl/unshorturl.php
+++ b/unshorturl/unshorturl.php
@@ -28,12 +28,12 @@ function unshorturl_prepare_body(&$body) {
}
$matches = [];
- $num_matches = preg_match_all('/https?:\/\/bit\.ly\/\w+/', $body['html'], $links);
+ $num_matches = preg_match_all('/https?:\/\/bit\.ly\/\w+/', $body['html'], $matches);
if ($num_matches > 0) {
foreach ($matches as $links) {
error_log('unshorturl: Links found: ' . implode(', ', $links));
foreach($links as $l) {
- str_replace($l, '[filtered bit.ly url]', $body['html']);
+ $body['html'] = str_replace($l, '[filtered bit.ly url]', $body['html']);
}
}
}