aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2022-01-31 09:49:00 +0100
committerMario Vavti <mario@mariovavti.com>2022-01-31 09:49:00 +0100
commit6c808abcfc9a52f8f331f9bfb58a455a90d1970d (patch)
tree34a84ee5674b832daf89a3654de7032dc25f226a /include
parentf1822bdfab8a5b997c32faa9c287a3fba1c0729b (diff)
downloadvolse-hubzilla-6c808abcfc9a52f8f331f9bfb58a455a90d1970d.tar.gz
volse-hubzilla-6c808abcfc9a52f8f331f9bfb58a455a90d1970d.tar.bz2
volse-hubzilla-6c808abcfc9a52f8f331f9bfb58a455a90d1970d.zip
PHP 8.1 band-aid
Diffstat (limited to 'include')
-rw-r--r--include/text.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/text.php b/include/text.php
index aea8790fc..b76175a06 100644
--- a/include/text.php
+++ b/include/text.php
@@ -1492,6 +1492,10 @@ function day_translate($s) {
* @return string
*/
function normalise_link($url) {
+ if (!$url) {
+ return EMPTY_STR;
+ }
+
$ret = str_replace(array('https:', '//www.'), array('http:', '//'), $url);
return(rtrim($ret, '/'));