R
ragtek
Guest
It would be really nice and useful if there would be a better errormessage in the method, instead of only returning the please_enter_valid_value phrase, which makes debugging without an real debugger a pain
My quick and dirty fix:
I've added $fieldName as additional paramter to _applyFieldValueLimits and changed
to
now it's returning
instead of
Which makes debugging A LOT EASIER!
My quick and dirty fix:
I've added $fieldName as additional paramter to _applyFieldValueLimits and changed
PHP:
if (isset($extraLimits['allowedValues']) && is_array($extraLimits['allowedValues']) && !in_array($value, $extraLimits['allowedValues']))
{
return new XenForo_Phrase('please_enter_valid_value');
}
PHP:
if (isset($extraLimits['allowedValues']) && is_array($extraLimits['allowedValues']) && !in_array($value, $extraLimits['allowedValues']))
{
return new XenForo_Phrase('please_enter_valid_value') . ' for ' .get_called_class() .' field ' . $fieldName;
}
now it's returning
Error
Please enter a valid value. for field blog_type
instead of
Error
Please enter a valid value.
Which makes debugging A LOT EASIER!
Upvote
2