Fix an exception in viewer, when client had an empty away message
This commit is contained in:
parent
c751001c61
commit
9a5e05ca84
|
@ -224,7 +224,8 @@ EOD;
|
|||
|
||||
$this->add(
|
||||
$html,
|
||||
$isQuery ? " is-query" : "", $client["client_database_id"],
|
||||
$isQuery ? " is-query" : "",
|
||||
$client["client_database_id"],
|
||||
$clientIcon,
|
||||
$clientName,
|
||||
$suffixIcons
|
||||
|
@ -284,7 +285,13 @@ EOD;
|
|||
}
|
||||
|
||||
if($client["client_away"]) {
|
||||
return $this->getIcon("away.svg", Utils::escape($client["client_away_message"]) ?: __get("VIEWER_CLIENT_AWAY"));
|
||||
if ($client["client_away_message"] !== null) {
|
||||
$awayTooltip = Utils::escape($client["client_away_message"]);
|
||||
} else {
|
||||
$awayTooltip = __get("VIEWER_CLIENT_AWAY");
|
||||
}
|
||||
|
||||
return $this->getIcon("away.svg", $awayTooltip);
|
||||
}
|
||||
|
||||
if(!$client["client_output_hardware"]) {
|
||||
|
|
Loading…
Reference in New Issue