phergie / phergie-irc-bot-react

IRC bot built on React
BSD 2-Clause "Simplified" License
81 stars 27 forks source link

Sending empty message results in ArgumentCountError #50

Open kelunik opened 7 years ago

kelunik commented 7 years ago

Sending an empty message results in an ArgumentCountError instead of a useful error message.

Jun 30 14:16:12 kelunik php7.1[10899]: PHP Fatal error:  Uncaught ArgumentCountError: Too few arguments to function Phergie\Irc\Client\React\WriteStream::ircPrivmsg(), 1 passed and exactly 2 expected in /git/mellon/vendor/phergie/phergie-irc-client-react/src/WriteStream.php:392
Jun 30 14:16:12 kelunik php7.1[10899]: Stack trace:
Jun 30 14:16:12 kelunik php7.1[10899]: #0 [internal function]: Phergie\Irc\Client\React\WriteStream->ircPrivmsg('#amphp')
Jun 30 14:16:12 kelunik php7.1[10899]: #1 /git/mellon/vendor/phergie/phergie-irc-bot-react/src/Bot.php(533): call_user_func_array(Array, Array)
Jun 30 14:16:12 kelunik php7.1[10899]: #2 /git/mellon/vendor/phergie/phergie-irc-bot-react/src/Bot.php(498): Phergie\Irc\Bot\React\Bot->processOutgoingEvents(Object(Phergie\Irc\Connection), Object(Phergie\Irc\Client\React\WriteStream))
Jun 30 14:16:12 kelunik php7.1[10899]: #3 /git/mellon/vendor/phergie/phergie-irc-bot-react/src/Bot.php(457): Phergie\Irc\Bot\React\Bot->processClientEvent('irc.received', Array, Object(Phergie\Irc\Connection), Object(Phergie\Irc\Client\React\WriteStream))
Jun 30 14:16:12 kelunik php7.1[10899]: #4 [internal function]: Phergie\Irc\Bot\React\Bot->Phergie\Irc\Bot\React\{closure}(Array, Object(Phergie\Irc\Client\React\WriteStream), Object(Phergie\Irc\Connection), Object(Monolog\Logg in /git/mellon/vendor/phergie/phergie-irc-client-react/src/WriteStream.php on line 392