Zend Framework

noticed fired from Zend_Translate_Adapter_Gettext which causes phpunit to throw exception

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Cannot Reproduce
  • Affects Version/s: None
  • Fix Version/s: 1.9.2
  • Component/s: Zend_Translate
  • Labels:
    None

Description

Noticed fired from Zend_Translate_Adapter_Gettext which causes phpunit to throw exception.

svn cat http://framework.zend.com/svn/framework/standard/tags/release-1.9.1/library/Zend/Translate/Adapter/Gettext.php |head -n148 |tail -n 1

$this->_data[$locale][''] = trim($this->_data[$locale]['']);

If index doesn't exist..notice is produced $this->_data[$locale]['']

Isset seems to fix the issue.

Activity

Hide
Julian Davchev added a comment -

Forgot to set components

Show
Julian Davchev added a comment - Forgot to set components
Hide
Thomas Weidner added a comment -

Not able to reproduce this behaviour.
The attached test-mo file has the info tags set and they are being read and outputted.

Show
Thomas Weidner added a comment - Not able to reproduce this behaviour. The attached test-mo file has the info tags set and they are being read and outputted.
Hide
Julian Davchev added a comment -

I am totally confused.

With ZF I always get the notice..unless the isset

With cakephp (they work directly on .po files) I see the notice in their code (again where they do ['']) only when both the .po and .mo files exists. If only .po file exists there is no notice using cakephp.

I know that ZF doesn't care about cakephp but find it totally confusing.

I guess can close this ticket as bogus

Show
Julian Davchev added a comment - I am totally confused. With ZF I always get the notice..unless the isset With cakephp (they work directly on .po files) I see the notice in their code (again where they do ['']) only when both the .po and .mo files exists. If only .po file exists there is no notice using cakephp. I know that ZF doesn't care about cakephp but find it totally confusing. I guess can close this ticket as bogus
Hide
Thomas Weidner added a comment -

It could be depended on the phpunit release you are using. ZF must be tested with 3.3 or above.

Regarding gettext: The ZF implementation is pure php based and does not use the gettext extension. As mo files have to info tag ('') always available there is no reason why a notice should be thrown. A mo file without info tag is a broken file. The tag can be empty, but it's always available.

Show
Thomas Weidner added a comment - It could be depended on the phpunit release you are using. ZF must be tested with 3.3 or above. Regarding gettext: The ZF implementation is pure php based and does not use the gettext extension. As mo files have to info tag ('') always available there is no reason why a notice should be thrown. A mo file without info tag is a broken file. The tag can be empty, but it's always available.
Hide
Thomas Weidner added a comment -

Closing as not reproducable.
Feel free to reopen it when you have new informations regarding this issue.

Show
Thomas Weidner added a comment - Closing as not reproducable. Feel free to reopen it when you have new informations regarding this issue.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: