mirror of
https://github.com/Mibew/mibew.git
synced 2025-01-31 05:20:30 +03:00
Properly check if variable is set before referencing it
For PHP 7.4
This commit is contained in:
parent
33fb35bd34
commit
62ad932aa7
@ -446,9 +446,10 @@ function setup_chatview_for_user(
|
|||||||
|
|
||||||
// Set default operator's avatar
|
// Set default operator's avatar
|
||||||
$operator = operator_by_id($thread->agentId);
|
$operator = operator_by_id($thread->agentId);
|
||||||
$data['chat']['avatar'] = $operator['vcavatar']
|
$data['chat']['avatar'] = '';
|
||||||
? $asset_url_generator->generate($operator['vcavatar'])
|
if (!empty($operator['vcavatar'])) {
|
||||||
: '';
|
$data['chat']['avatar'] = $asset_url_generator->generate($operator['vcavatar']);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
|
Loading…
Reference in New Issue
Block a user