prevent too long error reports

This commit is contained in:
Steffen Schröder 2014-05-24 22:34:57 +02:00
parent fcd4e577cf
commit d7975e33b7
3 changed files with 12 additions and 2 deletions

View File

@ -138,6 +138,11 @@ class ErrorHandler {
$traceString .= ' on Line ';
$traceString .= $traceStep['line'];
}
if (strlen($traceString) > 1300) {
// Too long...
$traceString .= '...';
break;
}
$stepCount++;
}
return $traceString;
@ -164,6 +169,11 @@ class ErrorHandler {
if ($index < $argsCount - 1) {
$string .= ', ';
}
if (strlen($string) > 100) {
// Too long...
$string .= '...';
break;
}
}
return $string;
}

View File

@ -22,7 +22,7 @@ class SettingManager implements CallbackListener {
const TABLE_SETTINGS = 'mc_settings';
const CB_SETTING_CHANGED = 'SettingManager.SettingChanged';
/** @deprecated Use CB_SETTING_CHANGED */
const CB_SETTINGS_CHANGED = 'SettingManager.SettingChanged';
const CB_SETTINGS_CHANGED = 'SettingManager.SettingsChanged';
/*
* Private Properties

View File

@ -23,7 +23,7 @@ abstract class ClassUtil {
if (is_string($object)) {
return $object;
}
trigger_error("Invalid class param: '{$object}'!");
trigger_error("Invalid class param: '" . print_r($object, true) . "'!");
return (string)$object;
}
}