ZF-3937: ( ! ) Notice: Undefined variable: temp in Zend/Translate/Adapter.php on line 300

Issue Type: Bug Created: 2008-08-12T14:05:10.000+0000 Last Updated: 2008-09-02T10:39:01.000+0000 Status: Resolved Fix version(s): - 1.6.0 (02/Sep/08)

Reporter: Geoffrey Tran (potatobob) Assignee: Thomas Weidner (thomas) Tags: - Zend_Translate

Related issues: Attachments: - patch.diff


$temp[0] was used but it wasn't defined ( ! ) Notice: Undefined variable: temp in /Zend/Translate/Adapter.php on line 300

This occurs due to the change from empty() to isset() in…

The cause is that _addTranslationData() adds the translation locale as an empty array() so isset evals to true.

From _addTranslationData()

<pre class="highlight">
        $locale = (string) $locale;
        if (isset($this->_translate[$locale]) === false) {
            $this->_translate[$locale] = array();


Posted by Thomas Weidner (thomas) on 2008-08-12T23:56:33.000+0000

Your patch adds the problem that adding empty resource files is no longer possible. This is a huge problem when working with the search options. The problem will be solved differently.

Posted by Thomas Weidner (thomas) on 2008-08-13T00:48:29.000+0000

Fixed with r10900

Posted by Wil Sinclair (wil) on 2008-09-02T10:39:01.000+0000

Updating for the 1.6.0 release.

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.