Skip to content

Commit a7cb2b0

Browse files
author
nveid
committed
Reversed the logic one place in the mysql client plugin
1 parent 1d8f7f1 commit a7cb2b0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/plugins-available/mysql_clientdb_plugin.inc.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ function db_insert($event_name,$data) {
131131

132132
//* Connect to the database
133133
$link = new mysqli($clientdb_host, $clientdb_user, $clientdb_password);
134-
if (!$link->connect_error) {
134+
if ($link->connect_error) {
135135
$app->log('Unable to connect to mysql'.$link->connect_error,LOGLEVEL_ERROR);
136136
return;
137137
}
@@ -184,7 +184,7 @@ function db_update($event_name,$data) {
184184

185185
//* Connect to the database
186186
$link = new mysqli($clientdb_host, $clientdb_user, $clientdb_password);
187-
if (!$link) {
187+
if ($link->connect_error) {
188188
$app->log('Unable to connect to the database: '.$link->connect_error,LOGLEVEL_ERROR);
189189
return;
190190
}

0 commit comments

Comments
 (0)