IRC bot crashes after .reload #4353

Closed
deutor opened this Issue Sep 6, 2016 · 0 comments

Projects

None yet

2 participants

@deutor
Contributor
deutor commented Sep 6, 2016

.reload causes IRC bot to crash silently. I've changed error_reporting in irc.php to error_reporting(E_ALL).
Then it throws an error (which is caused by include 'includes/defaults.inc.php'; in IRCBot.php reload function):
PHP Fatal error: Cannot redeclare set_debug() (previously declared in /opt/librenms/includes/defaults.inc.php:26) in /opt/librenms/includes/defaults.inc.php on line 35

Please note

Please read this information carefully.

  • Is your install up to date? Updating your install
  • Please include all of the information between the
    Version info:
    Commit SHA: f42406e
    [WARN] Your local git contains modified files, this could prevent automatic updates.
    Modified files:
    LibreNMS/IRCBot.php
    daily.sh
    irc.php
    DB Schema: 132
    PHP: 7.0.9
    MySQL: 5.1.73
    RRDTool: 1.5.6
    SNMP: NET-SNMP version: 5.5
@geordish geordish referenced this issue Sep 6, 2016
Merged

Removed duplicate include #4362

2 of 2 tasks complete
@laf laf added a commit that referenced this issue Sep 7, 2016
@geordish @laf geordish + laf fix: Stop irc bot crashing on .reload #4353
* Removed duplicate include

* Move set_debug into functions.php, and restore the (re)loading of includes/defaults

* Move debug call until after function has been included
f00c383
@laf laf closed this Sep 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment