Merge pull request #7405 from MrPetovan/bug/fatal-errors

Force invite remaining variable to be integer in Content\Widget
This commit is contained in:
Philipp 2019-07-18 15:30:58 +02:00 committed by GitHub
commit 75ebd4810d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -52,7 +52,7 @@ class Widget
$global_dir = Config::get('system', 'directory'); $global_dir = Config::get('system', 'directory');
if (Config::get('system', 'invitation_only')) { if (Config::get('system', 'invitation_only')) {
$x = PConfig::get(local_user(), 'system', 'invites_remaining'); $x = intval(PConfig::get(local_user(), 'system', 'invites_remaining'));
if ($x || is_site_admin()) { if ($x || is_site_admin()) {
$a->page['aside'] .= '<div class="side-link widget" id="side-invite-remain">' $a->page['aside'] .= '<div class="side-link widget" id="side-invite-remain">'
. L10n::tt('%d invitation available', '%d invitations available', $x) . L10n::tt('%d invitation available', '%d invitations available', $x)