diff options
author | Mario <mario@mariovavti.com> | 2022-10-26 18:12:56 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2022-10-26 18:12:56 +0000 |
commit | 40ae6b396f3760c4c4b6e4de776869a88ce07fce (patch) | |
tree | e54516ed5ca3d86faf24e1833c1b88294366f7a9 /Zotlabs/Module/Webpages.php | |
parent | 9c117ffa0546d6131310ae175e16e5ebf63992a1 (diff) | |
download | volse-hubzilla-40ae6b396f3760c4c4b6e4de776869a88ce07fce.tar.gz volse-hubzilla-40ae6b396f3760c4c4b6e4de776869a88ce07fce.tar.bz2 volse-hubzilla-40ae6b396f3760c4c4b6e4de776869a88ce07fce.zip |
fix php warnings
Diffstat (limited to 'Zotlabs/Module/Webpages.php')
-rw-r--r-- | Zotlabs/Module/Webpages.php | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/Zotlabs/Module/Webpages.php b/Zotlabs/Module/Webpages.php index bc47484be..b58c23b34 100644 --- a/Zotlabs/Module/Webpages.php +++ b/Zotlabs/Module/Webpages.php @@ -132,9 +132,9 @@ class Webpages extends Controller { return; } - $mimetype = (($_REQUEST['mimetype']) ? $_REQUEST['mimetype'] : get_pconfig($owner,'system','page_mimetype')); + $mimetype = ((isset($_REQUEST['mimetype']) && $_REQUEST['mimetype']) ? $_REQUEST['mimetype'] : get_pconfig($owner,'system','page_mimetype')); - $layout = (($_REQUEST['layout']) ? $_REQUEST['layout'] : get_pconfig($owner,'system','page_layout')); + $layout = ((isset($_REQUEST['layout']) && $_REQUEST['layout']) ? $_REQUEST['layout'] : get_pconfig($owner,'system','page_layout')); // Create a status editor (for now - we'll need a WYSIWYG eventually) to create pages // Nickname is set to the observers xchan, and profile_uid to the owner's. @@ -182,12 +182,9 @@ class Webpages extends Controller { 'bbcode' => true ); - if($_REQUEST['title']) - $x['title'] = $_REQUEST['title']; - if($_REQUEST['body']) - $x['body'] = $_REQUEST['body']; - if($_REQUEST['pagetitle']) - $x['pagetitle'] = $_REQUEST['pagetitle']; + $x['title'] = $_REQUEST['title'] ?? ''; + $x['body'] = $_REQUEST['body'] ?? ''; + $x['pagetitle'] = $_REQUEST['pagetitle'] ?? ''; // Get a list of webpages. We can't display all them because endless scroll makes that unusable, @@ -206,6 +203,7 @@ class Webpages extends Controller { if(! $r) $x['pagetitle'] = 'home'; + $a = ''; $editor = status_editor($a,$x,false,'Webpages'); $pages = null; |