Edit report at https://pear.php.net/bugs/bug.php?id=18586&edit=1
ID: 18586
Updated by: [email protected]
Reported By: tlhunter at gmail dot com
Summary: Register Action Handle only accepts one class
-Status: Open
+Status: Feedback
Type: Bug
Package: Net_SmartIRC
Operating System: Linux
Package Version: 1.0.2
PHP Version: 5.3.1
Roadmap Versions:
New Comment:
-Status: Open
+Status: Feedback
Thank you for taking the time to report a problem with the package.
This problem may have been already fixed by a previous change that
is in the SVN of the package. Please checking out the SVN
repository of this package and upgrade
svn checkout svn.php.net/repository/pear/packages/Net_SmartIRC/trunk
pear upgrade package2.xml
or
pear upgrade package.xml
If you are able to reproduce the bug with the latest SVN,
please change the status back to "Open".
Again, thank you for your continued support of PEAR.
I've made a lot of changes since I took over this package, so I may have
fixed this without realizing it. In any case, I just tried to reproduce
this issue with my latest code and I couldn't. It works properly now.
Previous Comments:
------------------------------------------------------------------------
[2011-06-04 21:16:34] renownedmedia
Description:
------------
When running multiple $irc->registerActionhandler() function
calls, the class argument (third parameter), only accepts one
class. It appears that later declarations overwrite previous ones.
Test script:
---------------
$irc->registerActionhandler(SMARTIRC_TYPE_QUERY, '!a1', $class1,
'message_handle');
$irc->registerActionhandler(SMARTIRC_TYPE_QUERY, '!a2', $class2,
'message_handle');
Expected result:
----------------
The method in $class1 and the method in $class2 to be executed.
Actual result:
--------------
Jun 04 16:00:12 SmartIRC.php(2309)
DEBUG_MESSAGEHANDLER: calling internal method
"Net_SmartIRC->_event_privmsg" (by string)
Jun 04 16:00:12 SmartIRC.php(2349)
DEBUG_ACTIONHANDLER: actionhandler match found for id: 1
type: 2 message: "!a2" regex: "/!a2/"
Jun 04 16:00:12 SmartIRC.php(2358)
DEBUG_ACTIONHANDLER: method doesn't exist!
"NameSpace\a1->message_handle"
------------------------------------------------------------------------
--
Edit this bug report at https://pear.php.net/bugs/bug.php?id=18586&edit=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.