<?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>Prevent inserting empty share &quot;objects&quot; into $all_shares array</title> 
  <pubDate>Wed, 08 Apr 2026 17:47:29 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/11999</link> 
  <atom:link rel="self" type="application/rss+xml" title="Prevent inserting empty share &quot;objects&quot; into $all_shares array" href="https://bugs.horde.org/ticket/11999/rss" /> 
  <description>Prevent inserting empty share &quot;objects&quot; into $all_shares array</description> 
 
   
   
  <item> 
   <title>Hi,

I just had a crash during login:

[Mon Jan 28 11:14</title> 
   <description>Hi,

I just had a crash during login:

[Mon Jan 28 11:14:31 2013] [error] [client 127.0.0.1] PHP Fatal error:  Call to a member function getName() on a non-object in /usr/share/pear/Horde/Share/Base.php on line 716

Full backtrace:
#0 [internal function]: Horde_Share_Base-&gt;_sortShares(Object(Horde_Share_Object_Kolab), NULL)
#1 /usr/share/pear/Horde/Share/Base.php(356): uasort(Array, Array)
#2 [internal function]: Horde_Share_Base-&gt;listShares(&#039;USERNAME&#039;, Array)
#3 /usr/share/pear/Horde/Core/Share/Driver.php(61): call_user_func_array(Array, Array)
#4 /usr/share/pear/www/horde/turba/lib/Turba.php(623): Horde_Core_Share_Driver-&gt;__call(&#039;listShares&#039;, Array)
#5 /usr/share/pear/www/horde/turba/lib/Turba.php(623): Horde_Core_Share_Driver-&gt;listShares(&#039;USERNAME&#039;, Array)
#6 /usr/share/pear/www/horde/turba/lib/Turba.php(442): Turba::listShares()
#7 /usr/share/pear/www/horde/turba/lib/Application.php(87): Turba::getConfigFromShares(Array)
#8 /usr/share/pear/Horde/Registry/Application.php(105): Turba_Application-&gt;_init()
#9 [internal function]: Horde_Registry_Application-&gt;init()
#10 /usr/share/pear/Horde/Registry.php(1139): call_user_func_array(Array, Array)
#11 /usr/share/pear/Horde/Registry.php(1543): Horde_Registry-&gt;callAppMethod(&#039;turba&#039;, &#039;init&#039;)
#12 /usr/share/pear/Horde/Registry.php(1071): Horde_Registry-&gt;pushApp(&#039;turba&#039;, Array)
#13 /usr/share/pear/Horde/Registry.php(1031): Horde_Registry-&gt;callByPackage(&#039;turba&#039;, &#039;listTimeObjectC...&#039;, Array)
#14 /usr/share/pear/www/horde/kronolith/lib/Kronolith.php(912): Horde_Registry-&gt;call(&#039;contacts/listTi...&#039;)
#15 /usr/share/pear/www/horde/kronolith/lib/Application.php(75): Kronolith::initialize()
#16 /usr/share/pear/Horde/Registry/Application.php(105): Kronolith_Application-&gt;_init()
#17 [internal function]: Horde_Registry_Application-&gt;init()
#18 /usr/share/pear/Horde/Registry.php(1139): call_user_func_array(Array, Array)
#19 /usr/share/pear/Horde/Registry.php(1543): Horde_Registry-&gt;callAppMethod(&#039;kronolith&#039;, &#039;init&#039;)
#20 /usr/share/pear/Horde/Registry.php(1136): Horde_Registry-&gt;pushApp(&#039;kronolith&#039;, Array)
#21 /usr/share/pear/Horde/Core/Factory/Notification.php(63): Horde_Registry-&gt;callAppMethod(&#039;kronolith&#039;, &#039;setupNotificati...&#039;, Array)
#22 /usr/share/pear/Horde/Injector/Binder/Factory.php(111): Horde_Core_Factory_Notification-&gt;create(Object(Horde_Injector))
#23 /usr/share/pear/Horde/Injector.php(213): Horde_Injector_Binder_Factory-&gt;create(Object(Horde_Injector))
#24 /usr/share/pear/Horde/Injector.php(247): Horde_Injector-&gt;createInstance(&#039;Horde_Notificat...&#039;)
#25 /usr/share/pear/Horde/Registry.php(507): Horde_Injector-&gt;getInstance(&#039;Horde_Notificat...&#039;)
#26 /usr/share/pear/Horde/Registry.php(238): Horde_Registry-&gt;__construct(0, Array)
#27 /usr/share/pear/www/horde/index.php(20): Horde_Registry::appInit(&#039;horde&#039;, Array)
#28 {main}


Turned out we added empty &quot;objects&quot; to the $all_shares list.
Attached patch fixes that.

Thomas
</description> 
   <pubDate>Mon, 28 Jan 2013 10:55:36 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/11999#t76433</link> 
  </item> 
   
  <item> 
   <title>I&#039;m not so sure we should be silently ignoring any case wher</title> 
   <description>I&#039;m not so sure we should be silently ignoring any case where we can&#039;t load an explicitly requested share.

Do you know *why* at least one of the shares requested in $cids was not found by _getShares()?</description> 
   <pubDate>Fri, 01 Feb 2013 20:19:12 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/11999#t76538</link> 
  </item> 
   
  <item> 
   <title>&gt; I&#039;m not so sure we should be silently ignoring any case wh</title> 
   <description>&gt; I&#039;m not so sure we should be silently ignoring any case where we 
&gt; can&#039;t load an explicitly requested share.

Should we throw an error instead?

&gt; Do you know *why* at least one of the shares requested in $cids was 
&gt; not found by _getShares()?

Unfortunately I couldn&#039;t properly trace it as it was a busy productive system
and I didn&#039;t want to add too many debug printfs() in there. Every time
I forget an &quot;;&quot;, a few users end up with a blank page :o)
</description> 
   <pubDate>Mon, 04 Feb 2013 08:22:15 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/11999#t76552</link> 
  </item> 
   
  <item> 
   <title>&gt;&gt; I&#039;m not so sure we should be silently ignoring any case w</title> 
   <description>&gt;&gt; I&#039;m not so sure we should be silently ignoring any case where we
&gt;&gt; can&#039;t load an explicitly requested share.
&gt;
&gt; Should we throw an error instead?

Horde_Exception_NotFound should be thrown from the concrete share class&#039; _getShares() method.</description> 
   <pubDate>Mon, 04 Feb 2013 14:53:18 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/11999#t76561</link> 
  </item> 
   
  <item> 
   <title>&gt;&gt;&gt; I&#039;m not so sure we should be silently ignoring any case </title> 
   <description>&gt;&gt;&gt; I&#039;m not so sure we should be silently ignoring any case where we
&gt;&gt;&gt; can&#039;t load an explicitly requested share.
&gt;&gt;
&gt;&gt; Should we throw an error instead?
&gt;
&gt; Horde_Exception_NotFound should be thrown from the concrete share 
&gt; class&#039; _getShares() method.

I&#039;ve checked the Kolab Share code and it does thrown an exception if one requests a share id that cannot be found.

While debugging this, I remember from my debug output that a rather long and a short share id was requested. Wild guess: The short id was just the username.

I think this might be a Kolab specific problem, call stack is roughly like this:

Base-&gt;getShares($ids) -&gt; Kolab-&gt;_getShares($ids) -&gt; Kolab-&gt;_getShareById($id).

The found share is stored with &quot;$share-&gt;getName()&quot; as the key.

Wild guess: For the Kolab case, &quot;$share-&gt;getName()&quot; might return something different than the request id. For example, you just requested the username as id and get an IMAP folder name back.

The Base-&gt;getShares() function assumes the returned array of share objects strictly uses the id as array key.

@Jan: Is it by design that &quot;Kolab-&gt;_getShares($ids)&quot; uses &quot;$share-&gt;getName()&quot; as key?
The SQL driver seems to work this way.

The &quot;getName()&quot; function in Share/Object/Kolab.php uses getId() as fallback if &quot;share_name&quot; is not available. So this some kind of fallback automagic...
</description> 
   <pubDate>Fri, 08 Feb 2013 09:34:54 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/11999#t76630</link> 
  </item> 
   
  <item> 
   <title>ping?</title> 
   <description>ping?</description> 
   <pubDate>Tue, 19 Mar 2013 14:04:33 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/11999#t77300</link> 
  </item> 
   
  <item> 
   <title>&gt; ping?

ok, I found something out about this:

The Kola</title> 
   <description>&gt; ping?

ok, I found something out about this:

The Kolab backend crashes a horrible death if you turn the INBOX of a user into a groupware folder. This does not make any sense at all, but one user managed to set his INBOX to the kolab folder type &quot;notes&quot;.

-&gt; We crash badly with this.

I think that was the same issue here. Too bad I don&#039;t have the &quot;id&quot; anymore that caused it as it&#039;s a base64 encoded serialized php array -&gt; we could easily reverse it and take a look.
That would also explain the &quot;short&quot; IDs I&#039;ve been seeing.
</description> 
   <pubDate>Wed, 18 Dec 2013 10:49:48 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/11999#t81892</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
