summaryrefslogtreecommitdiff
path: root/db-prefs.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2010-11-05 17:16:29 +0300
committerAndrew Dolgov <[email protected]>2010-11-05 17:16:29 +0300
commitc3fddd057f1d62297a170abcf657a52a8e039a4e (patch)
tree6936a9fb483e863e8a3783694d0f83fe2eff4394 /db-prefs.php
parent3b5ecd1779b041b1aea79ad00e9906b80b4846be (diff)
do some warning housekeeping
Diffstat (limited to 'db-prefs.php')
-rw-r--r--db-prefs.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/db-prefs.php b/db-prefs.php
index 228fa7ff8..af187df1b 100644
--- a/db-prefs.php
+++ b/db-prefs.php
@@ -11,10 +11,11 @@
$pref_name = db_escape_string($pref_name);
$prefs_cache = true;
+ $profile = false;
if (!$user_id) {
$user_id = $_SESSION["uid"];
- $profile = $_SESSION["profile"];
+ @$profile = $_SESSION["profile"];
} else {
$user_id = sprintf("%d", $user_id);
$prefs_cache = false;
@@ -29,7 +30,7 @@
if (get_schema_version($link) < 63) $profile_qpart = "";
if ($prefs_cache && !defined('DISABLE_SESSIONS') && !SINGLE_USER_MODE) {
- if ($_SESSION["prefs_cache"] && $_SESSION["prefs_cache"][$pref_name]) {
+ if ($_SESSION["prefs_cache"] && @$_SESSION["prefs_cache"][$pref_name]) {
$tuple = $_SESSION["prefs_cache"][$pref_name];
return convert_pref_type($tuple["value"], $tuple["type"]);
}
@@ -84,7 +85,7 @@
if (!$user_id) {
$user_id = $_SESSION["uid"];
- $profile = $_SESSION["profile"];
+ @$profile = $_SESSION["profile"];
} else {
$user_id = sprintf("%d", $user_id);
$prefs_cache = false;