Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-10104

missing one intval() along with others already being there

XMLWordPrintable

      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

            bantu Andreas Fischer [X] (Inactive)
            AmigoJack AmigoJack
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: