Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.1.14

Bug #21018 ChannelSync and references
Submitted: 2016-01-10 14:26 UTC
From: dawolfey Assigned: garrettw
Status: Closed Package: Net_SmartIRC (version 1.1.9)
PHP Version: 5.6.14 OS:
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 41 - 31 = ?

 
 [2016-01-10 14:26 UTC] dawolfey (Darren Wolfe)
Description: ------------ If channelsyncing is enabled, all users in a given channel should be stored in $_channels[]->users[] When the bot joins a channel, debugging shows the adding user / updating user lines as expected, however if you examine $irc- >channel['#chan']->users the array keys show the nicks in lowercase as expected, but the Net_SmartIRC_channeluser objects do not always show the correct user. I believe this is due to the _adduser function on line 2459 adding $newuser to the users array as a reference, since the object id's in the users array are identical. If line 2459 has the & removed, everything behave as expected. I really suspect I am doing something stupid, because as far as I can see this code has not changed in years and someone must have seen this apparently incorrect behaviour before now. Expected result: ---------------- Each Net_SmartIRC_channeluser object in $irc->channel['#chan']->users to be each user in the channel. Actual result: -------------- Some of the objects are connected to the wrong keys.

Comments

 [2016-03-10 23:26 UTC] garrettw (Garrett Whitehorn)
-Assigned To: +Assigned To: garrettw
Thanks for the report. I'll check it out.
 [2016-03-31 18:39 UTC] garrettw (Garrett Whitehorn)
Are you saying that you have tested it without the '&' and it does work correctly without it? I'll go ahead and push a commit with that fix because I don't see why it should break anything.
 [2016-05-13 16:46 UTC] garrettw (Garrett Whitehorn)
-Status: Assigned +Status: Closed
This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. Closing this since I never heard back from you. I'm going to assume the fix worked.