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

dead code in sessions.php

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • 3.1.7-RC1
    • 3.1.0-RC5
    • Sessions
    • None

      In phpBB/phpbb/sessions.php, we can find :

      							// If the database is not yet updated, there will be an error due to the session_forum_id
      							// @todo REMOVE for 3.0.2
      							if ($result === false)
      							{
      								unset($sql_ary['session_forum_id']);
       
      								$this->update_session($sql_ary);
      							}
      

      In addition to be very far from 3.0.2 in 3.1.x, the $result variable which originally was set by the in-line query replaced by update_session() is now meaningless and worst contains the result of the preceding query which exists in the method.

      I don't think this has great implication, but $result should either be returned by update_session or this entire code block removed.

            Marc Marc
            dcz dcz [X] (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: