From dd7e8c8d1df1602db3d30bf458a5320c888c1dde Mon Sep 17 00:00:00 2001 From: Oliver Schramm Date: Sun, 16 Mar 2014 12:03:36 +0100 Subject: [PATCH] [ticket/11169] Skip migration if "Users" category has been deleted or the module has already been moved to that category PHPBB3-11169 --- phpBB/phpbb/db/migration/data/v310/acp_prune_users_module.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/phpBB/phpbb/db/migration/data/v310/acp_prune_users_module.php b/phpBB/phpbb/db/migration/data/v310/acp_prune_users_module.php index b246317d8f..ab5b1a535b 100644 --- a/phpBB/phpbb/db/migration/data/v310/acp_prune_users_module.php +++ b/phpBB/phpbb/db/migration/data/v310/acp_prune_users_module.php @@ -30,7 +30,9 @@ class acp_prune_users_module extends \phpbb\db\migration\migration $acp_prune_users_parent = (int) $this->db->sql_fetchfield('parent_id'); $this->db->sql_freeresult($result); - return $acp_cat_users_id === $acp_prune_users_parent; + // Skip migration if "Users" category has been deleted + // or the module has already been moved to that category + return !$acp_cat_users_id || $acp_cat_users_id === $acp_prune_users_parent; } static public function depends_on()