From 77f1bac64bd00a581f71dccbb20b532ff1ec2434 Mon Sep 17 00:00:00 2001 From: rxu Date: Mon, 24 Oct 2016 01:41:24 +0700 Subject: [PATCH] [ticket/14831] Optimize code construction PHPBB3-14831 --- phpBB/phpbb/db/migration/tool/module.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/phpBB/phpbb/db/migration/tool/module.php b/phpBB/phpbb/db/migration/tool/module.php index a543fd5cab..7ea7d1dac1 100644 --- a/phpBB/phpbb/db/migration/tool/module.php +++ b/phpBB/phpbb/db/migration/tool/module.php @@ -91,14 +91,12 @@ class module implements \phpbb\db\migration\tool\tool_interface if ($parent !== false) { $parent = $this->get_parent_module_id($parent, $module, false); - if ($parent !== false) - { - $parent_sql = 'AND parent_id = ' . (int) $parent; - } - else + if ($parent === false) { return false; } + + $parent_sql = 'AND parent_id = ' . (int) $parent; } $sql = 'SELECT module_id