6.0.0-alpha14
7/3/25

[#13986] Call to a member function toHash() on a non-object when sharing additional calendars via caldav
Summary Call to a member function toHash() on a non-object when sharing additional calendars via caldav
Queue Kronolith
Queue Version 4.2.3
Type Bug
State Not A Bug
Priority 1. Low
Owners
Requester maarten (at) vsco (dot) be
Created 05/16/2015 (3701 days ago)
Due
Updated 08/09/2018 (2520 days ago)
Assigned 05/22/2015 (3695 days ago)
Resolved 05/26/2015 (3691 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
05/26/2015 09:00:50 AM Jan Schneider Comment #8
State ⇒ Not A Bug
Reply to this comment
So the calendar owner is user1 that was also in the url that I gave 
to the users to put in TB.
That's not a valid URL for anyone but user1.
05/23/2015 10:28:37 AM maarten (at) vsco (dot) be Comment #7 Reply to this comment
Does this happen for the calendar owner, or for the user that the 
calendar has been shared with? What permissions does the shared user 
have?
Permissions: Advanced sharing, all permissions given to All 
Authenticated Users.
So the calendar owner is user1 that was also in the url that I gave to 
the users to put in TB.
The user1 only is used to share calendars he doesn't exist as a 
physical user. So it is the user that the agenda has been shared with 
(all autheniticated users) that has the problem.
But now I see when I log in with my user the caldav url included my 
username instead of the calender owner.
For WebDAV/ICS Subscription URL it is the correct user.
Adding the caldav url with my user seems to work in TB, but it  should 
work with the calendar owner instead
05/22/2015 10:49:13 AM Jan Schneider Comment #6
State ⇒ Feedback
Reply to this comment
Does this happen for the calendar owner, or for the user that the 
calendar has been shared with? What permissions does the shared user 
have?
05/21/2015 04:13:16 PM maarten (at) vsco (dot) be Comment #5 Reply to this comment
This is not a duplicate of that bug. I just upgraded kronolith to 
4.2.7 and the problem stiill exists
This is the error location in lib/Application.php
684             $calendar = $calendar_manager
685                 ->getEntry(Kronolith::ALL_CALENDARS, $id)
686                 ->toHash();

Going to the url in a browser works, then I get a sabredav view with 
the needed .ics files.
But the PROPFIND fails from Thunderbird.

BR,
Maarten
05/18/2015 01:03:06 PM Michael Rubinsky Comment #4
Priority ⇒ 1. Low
State ⇒ Duplicate
Reply to this comment
05/16/2015 08:08:19 PM maarten (at) vsco (dot) be Comment #3 Reply to this comment
Hmm, Thunderbird still isn't able to view the calendar.

The error is on the PROPFIND http call: PHP Fatal error:  Call to a 
member function toHash() on a non-object in 
/var/www/horde/kronolith/lib/Application.php on line 686
05/16/2015 07:47:32 PM maarten (at) vsco (dot) be Comment #2 Reply to this comment
Never mind, found the problem.
The calenders were created in an older version of Kronolith.
I did a change on all of them just by clicking save on every calender.
Now they work.
05/16/2015 07:26:05 PM maarten (at) vsco (dot) be Comment #1
Priority ⇒ 2. Medium
State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒
Queue ⇒ Kronolith
Summary ⇒ Call to a member function toHash() on a non-object when sharing additional calendars via caldav
Type ⇒ Bug
Reply to this comment
Hi,

Problem occurs when you add additional calendars to a user and share them.

The sharing of the users main calendar works fine.

This is the error I get when I go to the URL:

A fatal error has occurred
Call to a member function toHash() on a non-object

1. Horde_ErrorHandler::catchFatalError()

Details
The full error message is logged in Horde's log file, and is shown 
below only to administrators. Non-administrative users will not see 
error details.

ErrorException Object
(
     [message:protected] => Call to a member function toHash() on a non-object
     [string:Exception:private] =>
     [code:protected] => 0
     [file:protected] => /var/www/horde/kronolith/lib/Application.php
     [line:protected] => 686
     [trace:Exception:private] => Array
         (
             [0] => Array
                 (
                     [function] => catchFatalError
                     [class] => Horde_ErrorHandler
                     [type] => ::
                     [args] => Array
                         (
                         )

                 )

         )

     [previous:Exception:private] =>
     [severity:protected] => 1
     [logged] => 1
)

Saved Queries