Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-10104

missing one intval() along with others already being there

    Details

      Description

      In /memberlist.php at line 1073 we have:

      			$sql_where .= ($auth->acl_get('u_viewonline') && sizeof($active) > 1 && isset($find_key_match[$active_select])) ? " AND u.user_lastvisit " . $find_key_match[$active_select] . ' ' . gmmktime(0, 0, 0, $active[1], intval($active[2]), intval($active[0])) : '';

      ...which lacks to intval() the argument $active[1] there. It should be:

      			$sql_where .= ($auth->acl_get('u_viewonline') && sizeof($active) > 1 && isset($find_key_match[$active_select])) ? " AND u.user_lastvisit " . $find_key_match[$active_select] . ' ' . gmmktime(0, 0, 0, intval($active[1]), intval($active[2]), intval($active[0])) : '';

      ...whereas I wonder why to use intval() at all instead of casting it via (int). I guess it's legacy/old code.

      Original source topic

        Issue Links

          Activity

          Hide
          bantu Andreas Fischer added a comment -

          The ticket no longer applies after the fix for PHPBB3-10021 was merged and is fixed.

          Show
          bantu Andreas Fischer added a comment - The ticket no longer applies after the fix for PHPBB3-10021 was merged and is fixed.

            People

            • Assignee:
              bantu Andreas Fischer
              Reporter:
              AmigoJack AmigoJack
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development