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

View File

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

View File

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