MDL-34065 lib: improve two debugging messages.
If the string passed to get_string is empty, say that. Don't say that it contains illegal characters. When relying on the __call magic in plugin_renderer_base, when the method cannot be found, include the right class name in the error message.
This commit is contained in:
committed by
Eloy Lafuente (stronk7)
parent
c3fcad7d55
commit
fede0be5de
+1
-1
@@ -7179,7 +7179,7 @@ function get_string($identifier, $component = '', $a = NULL, $lazyload = false)
|
||||
|
||||
$identifier = clean_param($identifier, PARAM_STRINGID);
|
||||
if (empty($identifier)) {
|
||||
throw new coding_exception('Invalid string identifier. Most probably some illegal character is part of the string identifier. Please fix your get_string() call and string definition');
|
||||
throw new coding_exception('Invalid string identifier. The identifier cannot be empty. Please fix your get_string() call.');
|
||||
}
|
||||
|
||||
// There is now a forth argument again, this time it is a boolean however so
|
||||
|
||||
Reference in New Issue
Block a user