1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-01-17 22:28:46 +01:00

Merge pull request #6421 from marc1706/ticket/17051

[ticket/17051] Fallback to default values for possible undefined user data
This commit is contained in:
Marc Alexander 2022-10-22 11:21:46 +02:00
commit 92cebdd624
No known key found for this signature in database
GPG Key ID: 50E0D2423696F995

View File

@ -152,7 +152,7 @@ class renderer implements \phpbb\textformatter\renderer_interface
* @param \phpbb\user $user
* @param \phpbb\config\config $config
* @param \phpbb\auth\auth $auth
* @return null
* @return void
*/
public function configure_user(\phpbb\user $user, \phpbb\config\config $config, \phpbb\auth\auth $auth)
{
@ -175,10 +175,10 @@ class renderer implements \phpbb\textformatter\renderer_interface
// Set this user's style id and other parameters
$this->renderer->setParameters(array(
'S_IS_BOT' => $user->data['is_bot'],
'S_REGISTERED_USER' => $user->data['is_registered'],
'S_USER_LOGGED_IN' => ($user->data['user_id'] != ANONYMOUS),
'STYLE_ID' => $user->style['style_id'],
'S_IS_BOT' => $user->data['is_bot'] ?? false,
'S_REGISTERED_USER' => $user->data['is_registered'] ?? false,
'S_USER_LOGGED_IN' => ($user->data['user_id'] != ANONYMOUS),
'STYLE_ID' => $user->style['style_id'],
));
}