6.0.0-beta1
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
7/26/25
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#5355] Fix for PHP4 reference handling
*
Your Email Address
*
Spam protection
Enter the letters below:
.__..__ \ /\ /.__ | |[ __ >< >< [__) |__|[_.// \/ \| \
Comment
> Hello Chuck, > > > >> I know you probably have, but did you test the Share change? There > >> have been problems in the past with assigning a reference to a static > >> variable in PHP 4. It may work if the static variable is an array, > >> instead of overwriting the static directly. But if you have: > >> > >> static $foo; > >> ... > >> $foo = &new Bar(); > >> > >> Then the reference won't take. > > > > Wow, I just modified my example code and it broke. Thanks for > pointing this out. The Horde_Share::singleton() code uses an array > $shares, so it should be ok. Works so far without problems here. I've > changed this as the new kolab share handler uses internal references > between parent and child objects. > > > >> Also, this should only matter if, in the constructor, the class > >> creates a child object that needs to be assigned by reference. So I > >> think a lot of the places you added it in Kronolith are unnecessary. > >> Can you add new patches that only add the & where it fixes a problem > >> we're seeing? > > > > Well, the new kronolith kolab driver uses an internal wrapper to > switch between the old and the new backend. This wrapper has a > back-reference to the Kronolith_Driver object, which breaks without > the change. The problem is you think its working, but you almost > won't notice it and then strange bugs occur when a variable inside > the real driver object changed and you still have an old copy of that > object floating around. > > > > If you want to you can skip the "FBview.php" and "Kronolith.php" part > of the patch > > as it was only changed to make the fix complete. I've just checked > all static variables in Kronolith, looks good to me. > > > > I'm still wondering a bit about Kronolith_Driver::factory(). The > comment states it should return a concrete instance of a driver, but > as far as I can see it always creates a new instance. Also take a > look at lib/Scheduler/kronolith.php. It creates a global driver > object and then creates another two. Is that supposed to happen? > > > > Cheers, > > Thomas > >
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers