Hid some PHP notices behind a '@' to minimize new user confusion.

This commit is contained in:
shrykedude 2003-10-24 00:54:28 +00:00
parent 00df8f407c
commit e52887d989
5 changed files with 10 additions and 10 deletions

View File

@ -1,5 +1,5 @@
<?php
if (!$phpgw_info['server']['contact_repository'])
if (!isset($phpgw_info['server']['contact_repository']))
{
$phpgw_info['server']['contact_repository'] = 'sql';
}

View File

@ -129,7 +129,7 @@
*/
function standard_substitutes()
{
if (!is_array($GLOBALS['phpgw_info']['user']['preferences']))
if (!is_array(@$GLOBALS['phpgw_info']['user']['preferences']))
{
$GLOBALS['phpgw_info']['user']['preferences'] = $this->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<pre>"; print_r($this->user); echo "</pre>\n";
echo "forced<pre>"; print_r($this->forced); echo "</pre>\n";
echo "default<pre>"; print_r($this->default); echo "</pre>\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'];
}

View File

@ -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));

View File

@ -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()

View File

@ -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();
}