There was a release of Net_SmartIRC on September 4, and they updated the _nick variable to be protected, whereas before it was declared with var but documented as private access. Using bot.module with the new release gets you a friendly

Error: Cannot access protected property Net_SmartIRC::$_nick in /home/ksenzee/workspace/bot/sites/all/modules/bot/bot.module, line 312

and the bot crashes. If you install the old version of Net_SmartIRC (sudo pear install -f Net_SmartIRC-1.0.2) all is well.

A quick skim of the new release didn't turn up a getter method for the _nick property but I didn't look carefully.

CommentFileSizeAuthor
#2 2349227-private_nick-2.patch1.6 KBcafuego
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Morbus Iff’s picture

Reported upstream here:

https://pear.php.net/bugs/bug.php?id=20419

Looks like it wasn't a really conscious decision - it's was marked as a "temporary" change for some other bug:

https://github.com/pear/Net_SmartIRC/commit/c90482fd04086957a7483498325f...

cafuego’s picture

There doesn't appear to be a getter for _nick. Doh. Attached patch uses the new isMe() method instead.

cafuego’s picture

Status: Active » Needs review
Morbus Iff’s picture

Status: Needs review » Fixed

@cafuego: that patch won't work. Removing the bot name from bot_regexp() would break nearly every addressable function.

Anyways, if you upgrade to the latest Net_SmartIRC (later than 1.1.0), it should work again, with no change to bot.module.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.