mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-28599 textlib Capture error message earlier to avoid mixing
This commit is contained in:
parent
0fde6cb8b4
commit
20079ee7bc
@ -595,6 +595,7 @@ abstract class collatorlib {
|
|||||||
// after instantiation as any futher calls to collation will cause
|
// after instantiation as any futher calls to collation will cause
|
||||||
// it to reset to 0 again (or another error code if one occured)
|
// it to reset to 0 again (or another error code if one occured)
|
||||||
$errorcode = $collator->getErrorCode();
|
$errorcode = $collator->getErrorCode();
|
||||||
|
$errormessage = $collator->getErrorMessage();
|
||||||
// Check for an error code, 0 means no error occured
|
// Check for an error code, 0 means no error occured
|
||||||
if ($errorcode !== 0) {
|
if ($errorcode !== 0) {
|
||||||
// Get the actual locale being used, e.g. en, he, zh
|
// Get the actual locale being used, e.g. en, he, zh
|
||||||
@ -617,7 +618,7 @@ abstract class collatorlib {
|
|||||||
} else {
|
} else {
|
||||||
// We've recieved some other sort of non fatal warning - let the
|
// We've recieved some other sort of non fatal warning - let the
|
||||||
// user know about it via debugging.
|
// user know about it via debugging.
|
||||||
debugging('Locale collator generated warnings (not fatal) "'.$collator->getErrorMessage().'" falling back to '.$collator->getLocale(Locale::VALID_LOCALE));
|
debugging('Locale collator generated warnings (not fatal) "'.$errormessage.'" falling back to '.$collator->getLocale(Locale::VALID_LOCALE));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Store the collator object now that we can be sure it is in a workable condition.
|
// Store the collator object now that we can be sure it is in a workable condition.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user