Fix create_state_index function

Shouldn’t be compared to false, but null instead.
This commit is contained in:
Rosiak
2016-03-08 21:45:18 +01:00
parent 03b8cc0c1b
commit 7c8806f784

View File

@@ -1447,7 +1447,7 @@ function rrdtest($path, &$stdOutput, &$stdError) {
}
function create_state_index($state_name) {
if (dbFetchRow('SELECT * FROM state_indexes WHERE state_name = ?', array($state_name)) === false) {
if (dbFetchRow('SELECT * FROM state_indexes WHERE state_name = ?', array($state_name)) == null) {
$insert = array('state_name' => $state_name);
return dbInsert($insert, 'state_indexes');
}