prevent too long error reports
This commit is contained in:
parent
fcd4e577cf
commit
d7975e33b7
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user