Null coalescing operator can be used.

This commit is contained in:
Yuriy Pikhtarev 2017-05-05 00:59:21 +03:00
commit 552f2a24a4
No known key found for this signature in database
GPG key ID: 3A9B5A757B48ECC6
26 changed files with 68 additions and 70 deletions

View file

@ -273,7 +273,7 @@ class sql_db
$row = mysqli_fetch_assoc($result);
if ($field_name) {
return isset($row[$field_name]) ? $row[$field_name] : false;
return $row[$field_name] ?? false;
}
return $row;