Details
-
Type:
Improvement
-
Status: Done/Fixed
-
Priority:
Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 3.0.3
-
Fix Version/s: 3.0.4
-
Component/s: Core CiviCRM
-
Labels:None
Description
When civicrm calls setlocale() in Variables.php, it does not check for a return value of false. This means that either the php install does not have gettext installed or none of the locales are available and should cause an error to warn the user.
I have attached a patch against 3.0.3 to add a check for setlocale() returning false and throw a fatal error. (This is actually my first time submitting a patch, so hopefully I got the format right
Jordan
The patch is perfectly good (and most appreciated!), but I'm not sure we actually want to do this. With this patch, people without gettext support or without the locales will see this error; with the current situation, they simply silently fall back to the default locale.
Do you have a particular use case where throwing a fatal error in this case is actually preferable?