From e52887d9890663e5125f5ca4b14e2224900a6b65 Mon Sep 17 00:00:00 2001 From: shrykedude Date: Fri, 24 Oct 2003 00:54:28 +0000 Subject: [PATCH] Hid some PHP notices behind a '@' to minimize new user confusion. --- phpgwapi/inc/class.contacts.inc.php | 2 +- phpgwapi/inc/class.preferences.inc.php | 6 +++--- phpgwapi/inc/class.sessions.inc.php | 2 +- phpgwapi/inc/class.sessions_php4.inc.php | 2 +- phpgwapi/inc/class.translation_sql.inc.php | 8 ++++---- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/phpgwapi/inc/class.contacts.inc.php b/phpgwapi/inc/class.contacts.inc.php index e2ac7df2df..b1a1ef3468 100644 --- a/phpgwapi/inc/class.contacts.inc.php +++ b/phpgwapi/inc/class.contacts.inc.php @@ -1,5 +1,5 @@ data; // else no lang() } @@ -272,7 +272,7 @@ { reset($this->data); } - if ($this->debug && substr($GLOBALS['phpgw_info']['flags']['currentapp'],0,3) != 'log') { + if (isset($this->debug) && substr($GLOBALS['phpgw_info']['flags']['currentapp'],0,3) != 'log') { echo "user
";    print_r($this->user); echo "
\n"; echo "forced
";  print_r($this->forced); echo "
\n"; echo "default
"; print_r($this->default); echo "
\n"; @@ -771,7 +771,7 @@ */ function email_address($account_id='') { - if ($this->data['email']['address']) + if (isset($this->data['email']['address'])) { return $this->data['email']['address']; } diff --git a/phpgwapi/inc/class.sessions.inc.php b/phpgwapi/inc/class.sessions.inc.php index 0e35ab4aae..143194640d 100644 --- a/phpgwapi/inc/class.sessions.inc.php +++ b/phpgwapi/inc/class.sessions.inc.php @@ -294,7 +294,7 @@ $GLOBALS['phpgw_info']['user']['account_id'] = $this->account_id; /* init the crypto object before appsession call below */ - $this->key = md5($this->kp3 . $this->sessionid . $GLOBALS['phpgw_info']['server']['encryptkey']); + $this->key = md5($this->kp3 . $this->sessionid . @$GLOBALS['phpgw_info']['server']['encryptkey']); $this->iv = $GLOBALS['phpgw_info']['server']['mcrypt_iv']; $GLOBALS['phpgw']->crypto->init(array($this->key,$this->iv)); diff --git a/phpgwapi/inc/class.sessions_php4.inc.php b/phpgwapi/inc/class.sessions_php4.inc.php index a90a3b65c5..8bcae50d1a 100644 --- a/phpgwapi/inc/class.sessions_php4.inc.php +++ b/phpgwapi/inc/class.sessions_php4.inc.php @@ -31,7 +31,7 @@ $this->sessions_(); //controls the time out for php4 sessions - skwashd 18-May-2003 ini_set('session.gc_maxlifetime', $GLOBALS['phpgw_info']['server']['sessions_timeout']); - define('PHPGW_PHPSESSID', ini_get('session.name')); + @define('PHPGW_PHPSESSID', ini_get('session.name')); } function read_session() diff --git a/phpgwapi/inc/class.translation_sql.inc.php b/phpgwapi/inc/class.translation_sql.inc.php index 095940bcad..8307466634 100644 --- a/phpgwapi/inc/class.translation_sql.inc.php +++ b/phpgwapi/inc/class.translation_sql.inc.php @@ -50,7 +50,7 @@ $this->db = is_object($GLOBALS['phpgw']->db) ? $GLOBALS['phpgw']->db : $GLOBALS['phpgw_setup']->db; if (!isset($GLOBALS['phpgw_setup'])) { - $this->system_charset = $GLOBALS['phpgw_info']['server']['system_charset']; + $this->system_charset = @$GLOBALS['phpgw_info']['server']['system_charset']; } else { @@ -98,7 +98,7 @@ return $this->system_charset; } // if no translations are loaded (system-startup) use a default, else lang('charset') - return !is_array($GLOBALS['lang']) ? 'iso-8859-1' : strtolower($this->translate('charset')); + return !is_array(@$GLOBALS['lang']) ? 'iso-8859-1' : strtolower($this->translate('charset')); } function init() @@ -106,7 +106,7 @@ // post-nuke and php-nuke are using $GLOBALS['lang'] too // but not as array! // this produces very strange results - if (!is_array($GLOBALS['lang'])) + if (!is_array(@$GLOBALS['lang'])) { $GLOBALS['lang'] = array(); } @@ -135,7 +135,7 @@ { $vars = array(); } - if (!is_array($GLOBALS['lang']) || !count($GLOBALS['lang'])) + if (!is_array(@$GLOBALS['lang']) || !count($GLOBALS['lang'])) { $this->init(); }