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

\phpbb\db\migration\tool\module.php contains several errors

    Details

    • Type: Bug
    • Status: Unverified Fix
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.0-a3
    • Fix Version/s: 3.1.0-b1
    • Component/s: None
    • Labels:

      Description

      	/** @var dbal */
      	protected $db;

      Invalid class dbal, should be \phpbb\db\driver\driver

      * @param mixed $cache

      Parameter $cache of the contructor should be \phpbb\cache\service in the doc block as it is type casted anyway

      Parameter $include_path of method add() is unused, Should it be used? it's used in the remove() method

      remove():
      The fetched field does not match any selected column.
      Also the variable module_name is unused later, therefor we could just remove the query from the else all together:

      			else
      			{
      				$module = (int) $module;
      				$sql = 'SELECT module_langname
      					FROM ' . $this->modules_table . "
      					WHERE module_id = $module
      						AND module_class = '" . $this->db->sql_escape($class) . "'
      						$parent_sql";
      				$result = $this->db->sql_query($sql);
      				$module_name = $this->db->sql_fetchfield('module_id');
      				$this->db->sql_freeresult($result);
       
      				$module_ids[] = $module;
      			}

      EXreaction [X] can you have a look?

        Attachments

          Activity

            People

            • Assignee:
              nickvergessen Joas Schilling
              Reporter:
              nickvergessen Joas Schilling
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: