]> git.mxchange.org Git - friendica.git/commitdiff
Force invite remaining variable to be integer in Content\Widget
authorHypolite Petovan <hypolite@mrpetovan.com>
Thu, 18 Jul 2019 12:42:07 +0000 (08:42 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Thu, 18 Jul 2019 12:42:07 +0000 (08:42 -0400)
- Addresses https://github.com/friendica/friendica/issues/7297#issuecomment-512786156

src/Content/Widget.php

index e8b08d42781e22f9250ebf921db932650c850592..a1482ae943a68aab80e3427d631caf3de006fe4a 100644 (file)
@@ -52,7 +52,7 @@ class Widget
                $global_dir = Config::get('system', 'directory');
 
                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()) {
                                $a->page['aside'] .= '<div class="side-link widget" id="side-invite-remain">'
                                        . L10n::tt('%d invitation available', '%d invitations available', $x)