<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title> Warning: Cannot use a scalar value as an array in Tree.php on line 1139</title> 
  <pubDate>Fri, 10 Apr 2026 17:52:16 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/6813</link> 
  <atom:link rel="self" type="application/rss+xml" title=" Warning: Cannot use a scalar value as an array in Tree.php on line 1139" href="https://bugs.horde.org/ticket/6813/rss" /> 
  <description> Warning: Cannot use a scalar value as an array in Tree.php on line 1139</description> 
 
   
   
  <item> 
   <title>We make heavy use of shared/public folders. I was trying to </title> 
   <description>We make heavy use of shared/public folders. I was trying to find a way to make the folders display more like what my users see on their desktop and that is have their private folders under INBOX and the shared folders on the same level as INBOX. I&#039;ve read the futile tickets on that subject so I won&#039;t complain. The warning message &quot;Warning: Cannot use a scalar value as an array in Tree.php on line 1139&quot; occurs when I switch to &quot;show non-private mailboxes in separate folders&quot;. It says warning but the web page fails to render properly. The alternative &quot;combine all namespaces&quot; has no problems but it is also what I am trying to avoid. We are using a dovecot server and my namespace configuration (cut to show a few shared/public folders) is



$servers[&#039;imap&#039;] = array(

    &#039;name&#039; =&gt; &#039;Mail Server&#039;,

    &#039;server&#039; =&gt; &#039;localhost&#039;,

    &#039;hordeauth&#039; =&gt; true,

    &#039;protocol&#039; =&gt; &#039;imap/notls&#039;,

    &#039;port&#039; =&gt; &#039;143&#039;,

    &#039;imap_config&#039; =&gt; array(

        &#039;children&#039; =&gt; true,

        &#039;namespace&#039; =&gt; array(

            &#039;INBOX.&#039; =&gt; array(

                &#039;name&#039; =&gt; &#039;INBOX.&#039;,

                &#039;delimiter&#039; =&gt; &#039;.&#039;,

                &#039;type&#039; =&gt; &#039;personal&#039;,

                &#039;hidden&#039; =&gt; false

            ),

            &#039;COMPANY.&#039; =&gt; array(

                &#039;name&#039; =&gt; &#039;COMPANY.&#039;,

                &#039;delimiter&#039; =&gt; &#039;.&#039;,

                &#039;type&#039; =&gt; &#039;shared&#039;,

                &#039;hidden&#039; =&gt; false

            ),

            &#039;ROOTMAIL.&#039; =&gt; array(

                &#039;name&#039; =&gt; &#039;ROOTMAIL.&#039;,

                &#039;delimiter&#039; =&gt; &#039;.&#039;,

                &#039;type&#039; =&gt; &#039;shared&#039;,

                &#039;hidden&#039; =&gt; false

            )

        ),

        &#039;search_charset&#039; =&gt; array(

            &#039;UTF-8&#039; =&gt; true

        )

    )

);



The function causing the problem is



    function _setAttribute(&amp;$elt, $const, $bool)

    {

        if ($bool) {

            $elt[&#039;a&#039;] |= $const; &lt;--- line 1139

        } else {

            $elt[&#039;a&#039;] &amp;= ~$const;

        }

    }



</description> 
   <pubDate>Sun, 01 Jun 2008 11:07:19 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/6813#t45757</link> 
  </item> 
   
  <item> 
   <title>Why are you using imap_config?  Why aren&#039;t you letting IMP a</title> 
   <description>Why are you using imap_config?  Why aren&#039;t you letting IMP auto-detect namespaces?</description> 
   <pubDate>Tue, 03 Jun 2008 04:12:39 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/6813#t45848</link> 
  </item> 
   
  <item> 
   <title>

I tried it w/o using imap_config and I get the same error/</title> 
   <description>

I tried it w/o using imap_config and I get the same error/warning:



$servers[&#039;imap&#039;] = array(

    &#039;name&#039; =&gt; Mail Server&#039;,

    &#039;server&#039; =&gt; &#039;localhost&#039;,

    &#039;hordeauth&#039; =&gt; true,

    &#039;protocol&#039; =&gt; &#039;imap/notls&#039;,

    &#039;port&#039; =&gt; &#039;143&#039;

);



When I use &quot;show non-private mailboxes in separate folders&quot; I see the warning on the page but additionally (from reading the code) the folder &quot;Shared Folders&quot; is not in the tree, nor are any of the share folders. On the other hand, if I use &quot;combine all namespaces&quot; I can see the share folders and there aren&#039;t any warnings/errors.



To answer the first question, originally I did not use imap_config but then I could not figure out why the personal folders were not showing up under INBOX. So I figured I would &quot;hard-code&quot; the namespaces since apparently (to me) IMP was not getting it right. I spent a great deal of time floundering there. Finally I read the tickets on this subject and just left the configuration that way. I understand that imap_config is not supported. 



Thanks.



</description> 
   <pubDate>Tue, 03 Jun 2008 04:46:47 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/6813#t45854</link> 
  </item> 
   
  <item> 
   <title>Going to mark as resolved with the addition of the new IMAP_</title> 
   <description>Going to mark as resolved with the addition of the new IMAP_Tree library (Ticket #6972).</description> 
   <pubDate>Fri, 27 Jun 2008 02:11:52 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/6813#t46913</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
