aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-03-10 11:14:03 +0000
committerMario <mario@mariovavti.com>2021-03-10 11:14:03 +0000
commitc8050ea86587b460769a32be5c55a91fb91c2414 (patch)
tree1579f58a6065e73ddf5dbbefedcc4d8e0bca9e08 /Zotlabs/Module
parent15faf01ec960fff88a1f9c83fb6d251319cecea7 (diff)
parent11d831e4d7bd4163ea518892f541252ce1acea2e (diff)
downloadvolse-hubzilla-c8050ea86587b460769a32be5c55a91fb91c2414.tar.gz
volse-hubzilla-c8050ea86587b460769a32be5c55a91fb91c2414.tar.bz2
volse-hubzilla-c8050ea86587b460769a32be5c55a91fb91c2414.zip
Merge branch 'php8fixes' into 'dev'
More PHP 8 fixes See merge request hubzilla/core!1923
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r--Zotlabs/Module/Channel.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/Zotlabs/Module/Channel.php b/Zotlabs/Module/Channel.php
index 233e5ac86..ab5000b9a 100644
--- a/Zotlabs/Module/Channel.php
+++ b/Zotlabs/Module/Channel.php
@@ -27,7 +27,7 @@ class Channel extends Controller {
function init() {
- if (in_array(substr($_GET['search'], 0, 1), ['@', '!', '?']) || strpos($_GET['search'], 'https://') === 0)
+ if (array_key_exists('search', $_GET) && (in_array(substr($_GET['search'], 0, 1), ['@', '!', '?']) || strpos($_GET['search'], 'https://') === 0))
goaway(z_root() . '/search?f=&search=' . $_GET['search']);
$which = null;
@@ -155,7 +155,7 @@ class Channel extends Controller {
intval($channel['channel_id'])
);
- opengraph_add_meta($r ? $r[0] : [], $channel);
+ opengraph_add_meta((isset($r) && count($r) ? $r[0] : []), $channel);
}
function get($update = 0, $load = false) {
@@ -168,7 +168,7 @@ class Channel extends Controller {
if (strpos($mid, 'b64.') === 0)
$decoded = @base64url_decode(substr($mid, 4));
- if ($decoded)
+ if (isset($decoded))
$mid = $decoded;
$datequery = ((x($_GET, 'dend') && is_a_date_arg($_GET['dend'])) ? notags($_GET['dend']) : '');
@@ -420,7 +420,7 @@ class Channel extends Controller {
if ((!$update) && (!$load)) {
- if ($decoded)
+ if (isset($decoded))
$mid = 'b64.' . base64url_encode($mid);
// This is ugly, but we can't pass the profile_uid through the session to the ajax updater,
@@ -486,7 +486,7 @@ class Channel extends Controller {
$o .= conversation($items, $mode, $update, $page_mode);
- if ($mid && $items[0]['title'])
+ if ($mid && count($items) > 0 && isset($items[0]['title']))
App::$page['title'] = $items[0]['title'] . " - " . App::$page['title'];
}