diff --git a/src/messenger/webim/libs/common.php b/src/messenger/webim/libs/common.php index bdf9e735..ef5916e4 100644 --- a/src/messenger/webim/libs/common.php +++ b/src/messenger/webim/libs/common.php @@ -400,7 +400,11 @@ function db_fetch_assoc($result){ function perform_query($query, $link) { - mysql_query($query, $link) or die(' Query failed: ' . db_error($link)); + $result = mysql_query($query, $link); + if (! $result) { + die(' Query failed: ' . db_error($link)); + } + return $result; } function select_one_row($query, $link)