From 2fab9b314d9b25f55c17b54eb50f1599613b554c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=ADas=20Barletta?= Date: Tue, 5 Jun 2018 20:25:53 -0600 Subject: [PATCH] fix: erratic app_list_strings --- rest.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rest.php b/rest.php index 8084ccb..20fde5c 100644 --- a/rest.php +++ b/rest.php @@ -76,6 +76,10 @@ $GLOBALS['current_user'] = new User(); $GLOBALS['current_user']->retrieve($_SESSION['authenticated_user_id']); } + if(empty($GLOBALS['current_language'])){ + $GLOBALS['current_language'] = $sugar_config['default_language']; + } + $GLOBALS['app_list_strings'] = return_app_list_strings_language($GLOBALS['current_language']); return $next($request, $response); }else{ return $response->withJson(['result'=>'error','message'=> 'not authenticated'], 403);