From a3f68852ceb7021959abefe838a4aefc774d2076 Mon Sep 17 00:00:00 2001 From: Dmitriy Simushev Date: Tue, 24 Mar 2015 15:29:18 +0000 Subject: [PATCH] Fix broken avatar URL in invitation --- .../libs/classes/Mibew/Controller/WidgetController.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mibew/libs/classes/Mibew/Controller/WidgetController.php b/src/mibew/libs/classes/Mibew/Controller/WidgetController.php index f32c9563..27bd8bef 100644 --- a/src/mibew/libs/classes/Mibew/Controller/WidgetController.php +++ b/src/mibew/libs/classes/Mibew/Controller/WidgetController.php @@ -120,16 +120,16 @@ class WidgetController extends AbstractController $operator_name = ($locale == get_home_locale()) ? $operator['vclocalename'] : $operator['vccommonname']; + $avatar_url = $operator['vcavatar'] + ? $this->asset($operator['vcavatar'], AssetUrlGeneratorInterface::ABSOLUTE_URL) + : false; // Show invitation dialog at widget side $response_data['handlers'][] = 'invitationCreate'; $response_data['dependencies']['invitationCreate'] = array(); $response_data['data']['invitation'] = array( 'operatorName' => htmlspecialchars($operator_name), - 'avatarUrl' => htmlspecialchars($this->asset( - $operator['vcavatar'], - AssetUrlGeneratorInterface::ABSOLUTE_URL - )), + 'avatarUrl' => htmlspecialchars($avatar_url), 'threadUrl' => $this->generateUrl( 'chat_user_invitation', array(),