Injecting into the dev_cache without having hostname set caused the code to run an sql query.
Fix undefined index errors.
This commit is contained in:
Tony Murray
2017-06-20 16:56:38 -05:00
committed by GitHub
parent b8452862af
commit 2f4efb2a43
2 changed files with 4 additions and 4 deletions

View File

@@ -238,7 +238,7 @@ class SyslogTest extends \PHPUnit_Framework_TestCase
{
// populate fake $dev_cache and $config
global $config, $dev_cache;
$dev_cache['1.1.1.1'] = array('device_id' => 1, 'os' => 'zywall', 'version' => 1);
$dev_cache['1.1.1.1'] = array('device_id' => 1, 'os' => 'zywall', 'version' => 1, 'hostname' => 'zywall');
$config = array();
$config['syslog_filter'] = array();