aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/dir_fns.php3
-rw-r--r--mod/toggle_safesearch.php2
2 files changed, 4 insertions, 1 deletions
diff --git a/include/dir_fns.php b/include/dir_fns.php
index 0c9a6bd9f..02e8186b7 100644
--- a/include/dir_fns.php
+++ b/include/dir_fns.php
@@ -22,7 +22,8 @@ function dir_sort_links() {
function dir_safe_mode() {
$observer = get_observer_hash();
-
+if (! $observer)
+ return;
if ($observer)
$safe_mode = get_xconfig($observer,'directory','safe_mode');
if($safe_mode === '0')
diff --git a/mod/toggle_safesearch.php b/mod/toggle_safesearch.php
index 5fb18f694..3c800c4f3 100644
--- a/mod/toggle_safesearch.php
+++ b/mod/toggle_safesearch.php
@@ -3,6 +3,8 @@
function toggle_safesearch_init(&$a) {
$observer = get_observer_hash();
+if (! $observer)
+ return;
if($observer)
$safe_mode = get_xconfig($observer,'directory','safe_mode');