PHP4: undefined index: messages
Bug #554199 reported by
ryanhowdy
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
php-gettext |
Fix Released
|
High
|
Данило Шеган |
Bug Description
version 1.0.9 of php-gettext
php version 4.4.9 w/ gettext support enabled
I've had several users report an issue with an undefined index 'messages' on line 190 in the gettext.inc file
line 188: // Allow locale to be changed on the go for one translation domain.
line 189: global $text_domains, $default_domain;
line 190: unset($
line 191: return $CURRENTLOCALE;
Changed in php-gettext: | |
status: | Invalid → New |
Changed in php-gettext: | |
status: | New → Triaged |
importance: | Undecided → High |
summary: |
- undefined index: messages + PHP4: undefined index: messages |
To post a comment you must log in.
It seems no textdomain call was executed (which sets $default_domain). I've added a nicer error message here.
FWIW, the reason why you are probably getting this is because you are not using all emulated calls: all php-gettext calls will fallback on compiled in gettext support whenever possible (i.e. you might still need emulation when locales are not existant on the system you are running on), but php-gettext needs to be fully initialized.
Can you please check if you are just setting the default domain with textdomain() (built-in gettext) call, or are you using one that includes the emulation layer?