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

'Permission' migration tool incorrectly handles role removal

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.3.6-RC1
    • 3.3.5
    • Migrations
    • None

      public function role_remove($role_name) in \phpbb\db\migration\tool\permission.php doesn't correctly handle role removal like does the function remove_role($role_id, $permission_type) in \includes\acp\acp_permission_roles.php.

      In particular, it misses unsetting related permissions and group/user role removals. This may lead to cases when groups/users have non-existant roles assigned and to some errors during installation of extensions, like 

      [phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/migration/tool/permission.php on line 428: Trying to access array offset on value of type bool
      [phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/migration/tool/permission.php on line 429: Trying to access array offset on value of type bool

      Something went wrong during the request and an exception was thrown. The changes made before the error occurred were reversed to the best of our abilities, but you should check the board for errors. The permission role "" unexpectedly does not exist.

       

            Marc Marc
            rxu rxu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: