Browse Source

Minor - use "is_int" instead of is_integer

Julio Montoya 6 years ago
parent
commit
1b362bd608
2 changed files with 3 additions and 5 deletions
  1. 2 4
      main/auth/inscription.php
  2. 1 1
      main/inc/lib/groupmanager.lib.php

+ 2 - 4
main/auth/inscription.php

@@ -447,9 +447,7 @@ if (!CustomPages::enabled()) {
                     $language = api_get_language_id($language);
                     $term_preview = LegalManager::get_last_condition($language);
                 }
-                $tool_name = get_lang('TermsAndConditions');
-                Display::display_header($tool_name);
-
+                Display::display_header(get_lang('TermsAndConditions'));
                 if (!empty($term_preview['content'])) {
                     echo $term_preview['content'];
                 } else {
@@ -709,7 +707,7 @@ if ($form->validate()) {
 
         // Update the extra fields
         $count_extra_field = count($extras);
-        if ($count_extra_field > 0 && is_integer($user_id)) {
+        if ($count_extra_field > 0 && is_int($user_id)) {
             foreach ($extras as $key => $value) {
                 // For array $value -> if exists key 'tmp_name' then must not be empty
                 // This avoid delete from user field value table when doesn't upload a file

+ 1 - 1
main/inc/lib/groupmanager.lib.php

@@ -547,7 +547,7 @@ class GroupManager
     public static function get_group_properties($group_id, $useIid = false)
     {
         $course_id = api_get_course_int_id();
-        if (empty($group_id) || !is_integer(intval($group_id))) {
+        if (empty($group_id) || !is_int(intval($group_id))) {
             return null;
         }