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

missing one intval() along with others already being there

    XMLWordPrintable

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

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: