aboutsummaryrefslogtreecommitdiffstats
path: root/include/channel.php
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2024-11-14 18:40:15 +0000
committerMario <mario@mariovavti.com>2024-11-14 18:40:15 +0000
commit951800eca6045f6e0dc1e9a12c225c8e55b044e9 (patch)
tree2eaa48c246725a85b4277db07b72831f088cf5e9 /include/channel.php
parentd446f171c50b3d74b2f9865ccf17b535aaa38fe1 (diff)
downloadvolse-hubzilla-951800eca6045f6e0dc1e9a12c225c8e55b044e9.tar.gz
volse-hubzilla-951800eca6045f6e0dc1e9a12c225c8e55b044e9.tar.bz2
volse-hubzilla-951800eca6045f6e0dc1e9a12c225c8e55b044e9.zip
Several issues discovered by PHPStan
Diffstat (limited to 'include/channel.php')
-rw-r--r--include/channel.php12
1 files changed, 4 insertions, 8 deletions
diff --git a/include/channel.php b/include/channel.php
index 0ece3be74..a3ba1a765 100644
--- a/include/channel.php
+++ b/include/channel.php
@@ -96,6 +96,8 @@ function validate_channelname($name) {
if (x($arr, 'message'))
return $arr['message'];
+
+ return null;
}
@@ -2428,7 +2430,7 @@ function get_zcard($channel, $observer_hash = '', $args = array()) {
$cover = [ 'href' => z_root() . '/images/default_cover_photos/' . $default_cover . '/' . $cover_width . '.png' ];
}
- $o .= replace_macros(get_markup_template('zcard.tpl'), array(
+ return replace_macros(get_markup_template('zcard.tpl'), array(
'$maxwidth' => $maxwidth,
'$scale' => $scale,
'$translate' => $translate,
@@ -2437,8 +2439,6 @@ function get_zcard($channel, $observer_hash = '', $args = array()) {
'$pphoto' => $pphoto,
'$zcard' => $zcard
));
-
- return $o;
}
@@ -2505,17 +2505,13 @@ function get_zcard_embed($channel, $observer_hash = '', $args = array()) {
$cover = [ 'href' => z_root() . '/images/default_cover_photos/' . $default_cover . '/' . $cover_width . '.png' ];
}
- $o .= replace_macros(get_markup_template('zcard_embed.tpl'),array(
+ return replace_macros(get_markup_template('zcard_embed.tpl'),array(
'$maxwidth' => $maxwidth,
- '$scale' => $scale,
- '$translate' => $translate,
'$size' => $size,
'$cover' => $cover,
'$pphoto' => $pphoto,
'$zcard' => $zcard
));
-
- return $o;
}
/**