aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/markdown.php5
-rw-r--r--include/nav.php2
-rw-r--r--include/socgraph.php3
-rw-r--r--include/zid.php6
4 files changed, 11 insertions, 5 deletions
diff --git a/include/markdown.php b/include/markdown.php
index a0e07ba68..7fba1259f 100644
--- a/include/markdown.php
+++ b/include/markdown.php
@@ -66,7 +66,10 @@ function markdown_to_bb($s, $use_zrl = false, $options = []) {
$s = MarkdownExtra::defaultTransform($s);
- if($options && $options['preserve_lf']) {
+
+ $preserve_lf = $options['preserve_lf'] ?? false;
+
+ if($preserve_lf) {
$s = str_replace(["\r","\n"],["",'<br>'],$s);
}
else {
diff --git a/include/nav.php b/include/nav.php
index 65d5a3ef6..71b3bec49 100644
--- a/include/nav.php
+++ b/include/nav.php
@@ -206,7 +206,7 @@ function nav($template = 'default') {
$url = '';
$settings_url = '';
- if (App::$profile_uid && App::$nav_sel['raw_name']) {
+ if (App::$profile_uid && isset(App::$nav_sel['raw_name']) && App::$nav_sel['raw_name']) {
$active_app = q("SELECT app_url FROM app WHERE app_channel = %d AND app_name = '%s' LIMIT 1",
intval(App::$profile_uid),
dbesc(App::$nav_sel['raw_name'])
diff --git a/include/socgraph.php b/include/socgraph.php
index 874086788..f08913ee2 100644
--- a/include/socgraph.php
+++ b/include/socgraph.php
@@ -342,6 +342,7 @@ function poco() {
}
$observer = App::get_observer();
+ $user = '';
if(argc() > 1) {
$user = notags(trim(argv(1)));
@@ -355,7 +356,7 @@ function poco() {
$system_mode = true;
}
- $format = (($_REQUEST['format']) ? $_REQUEST['format'] : 'json');
+ $format = $_REQUEST['format'] ?? 'json';
$justme = false;
diff --git a/include/zid.php b/include/zid.php
index 5710d9f3f..b38457d99 100644
--- a/include/zid.php
+++ b/include/zid.php
@@ -359,10 +359,12 @@ function owt_init($token) {
$_SESSION['authenticated'] = 1;
+ $delegate = $_REQUEST['delegate'] ?? '';
$delegate_success = false;
- if($_REQUEST['delegate']) {
+
+ if($delegate) {
$r = q("select * from channel left join xchan on channel_hash = xchan_hash where xchan_addr = '%s' limit 1",
- dbesc($_REQUEST['delegate'])
+ dbesc($delegate)
);
if ($r && intval($r[0]['channel_id'])) {
$allowed = perm_is_allowed($r[0]['channel_id'],$hubloc['xchan_hash'],'delegate');