aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Settings
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2022-10-23 14:02:19 +0200
committerMario Vavti <mario@mariovavti.com>2022-10-23 14:02:19 +0200
commit8879776d6436ed5257648a1873ddaa9486b25070 (patch)
tree996c192607ed8b1a4b03bd620deb4b1f3b348a48 /Zotlabs/Module/Settings
parent5edd13c6bb89c7434d8437f8cc74c038371fdbf8 (diff)
downloadvolse-hubzilla-8879776d6436ed5257648a1873ddaa9486b25070.tar.gz
volse-hubzilla-8879776d6436ed5257648a1873ddaa9486b25070.tar.bz2
volse-hubzilla-8879776d6436ed5257648a1873ddaa9486b25070.zip
fix php warnings
Diffstat (limited to 'Zotlabs/Module/Settings')
-rw-r--r--Zotlabs/Module/Settings/Channel.php9
-rw-r--r--Zotlabs/Module/Settings/Display.php10
2 files changed, 10 insertions, 9 deletions
diff --git a/Zotlabs/Module/Settings/Channel.php b/Zotlabs/Module/Settings/Channel.php
index 840efc162..1e0c2a2db 100644
--- a/Zotlabs/Module/Settings/Channel.php
+++ b/Zotlabs/Module/Settings/Channel.php
@@ -27,10 +27,10 @@ class Channel {
$photo_path = ((x($_POST, 'photo_path')) ? escape_tags(trim($_POST['photo_path'])) : '');
$attach_path = ((x($_POST, 'attach_path')) ? escape_tags(trim($_POST['attach_path'])) : '');
$allow_location = (((x($_POST, 'allow_location')) && (intval($_POST['allow_location']) == 1)) ? 1 : 0);
- $post_newfriend = (($_POST['post_newfriend'] == 1) ? 1 : 0);
- $post_joingroup = (($_POST['post_joingroup'] == 1) ? 1 : 0);
- $post_profilechange = (($_POST['post_profilechange'] == 1) ? 1 : 0);
- $adult = (($_POST['adult'] == 1) ? 1 : 0);
+ $post_newfriend = ((isset($_POST['post_newfriend']) && $_POST['post_newfriend'] == 1) ? 1 : 0);
+ $post_joingroup = ((isset($_POST['post_joingroup']) && $_POST['post_joingroup'] == 1) ? 1 : 0);
+ $post_profilechange = ((isset($_POST['post_profilechange']) && $_POST['post_profilechange'] == 1) ? 1 : 0);
+ $adult = ((isset($_POST['adult']) && $_POST['adult'] == 1) ? 1 : 0);
$mailhost = ((array_key_exists('mailhost', $_POST)) ? notags(trim($_POST['mailhost'])) : '');
$pageflags = $channel['channel_pageflags'];
$existing_adult = (($pageflags & PAGE_ADULT) ? 1 : 0);
@@ -152,6 +152,7 @@ class Channel {
Master::Summon(['Directory', local_channel()]);
Libsync::build_sync_packet();
+ $email_changed = false;
if ($email_changed && App::$config['system']['register_policy'] == REGISTER_VERIFY) {
// FIXME - set to un-verified, blocked and redirect to logout
diff --git a/Zotlabs/Module/Settings/Display.php b/Zotlabs/Module/Settings/Display.php
index 11181907b..ea9ae2da1 100644
--- a/Zotlabs/Module/Settings/Display.php
+++ b/Zotlabs/Module/Settings/Display.php
@@ -90,8 +90,8 @@ class Display {
$default_theme = 'redbasic';
$themespec = explode(':', \App::$channel['channel_theme']);
- $existing_theme = $themespec[0];
- $existing_schema = $themespec[1];
+ $existing_theme = $themespec[0] ?? '';
+ $existing_schema = $themespec[1] ?? '';
$theme = (($existing_theme) ? $existing_theme : $default_theme);
@@ -207,12 +207,12 @@ class Display {
function get_theme_config_file($theme){
- $base_theme = \App::$theme_info['extends'];
+ $base_theme = \App::$theme_info['extends'] ?? '';
- if (file_exists("view/theme/$theme/php/config.php")){
+ if ($theme && file_exists("view/theme/$theme/php/config.php")){
return "view/theme/$theme/php/config.php";
}
- if (file_exists("view/theme/$base_theme/php/config.php")){
+ if ($base_theme && file_exists("view/theme/$base_theme/php/config.php")){
return "view/theme/$base_theme/php/config.php";
}
return null;