The line 74 in includes/errors.inc is:
$bt = $SysPrefs->go_debug>1 ? get_backtrace(true, 1) : array();
Try to replace it with and see:
$bt = (($SysPrefs->go_debug > 1) ? get_backtrace(true, 1) : array());
$go_debug is defined in config.php and gets into the $SysPrefs object is all is well.
The backtrace comes in correctly.
The line 85 in the same file is:
error_log(user_company() . ":$user:". basename($file) .":$line:$context $errstr");
Try to replace it with:
$msg_tmp = user_company() . ":$user:". basename($file) .":$line:$context $errstr";
error_log($msg_tmp);
The function user_company() is defined in lines 425 - 430 in includes/current_user.inc:
function user_company()
{
global $def_coy;
return isset($_SESSION["wa_current_user"]) ? $_SESSION["wa_current_user"]->company : $def_coy;
}
Make sure that the user you logged in as exists in the company's database's users table.