aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorrxu <rxu@mail.ru>2016-10-23 22:44:47 +0700
committerrxu <rxu@mail.ru>2016-10-23 22:44:47 +0700
commit51ef1ae346c08863d188e723ba41720e744a2fbd (patch)
tree84f29925ff5d59fcdc135bdbeadac0733966c7c0 /phpBB
parenta02b124dd02f8c5a2d0c60820f6563311e983a4c (diff)
downloadforums-51ef1ae346c08863d188e723ba41720e744a2fbd.tar
forums-51ef1ae346c08863d188e723ba41720e744a2fbd.tar.gz
forums-51ef1ae346c08863d188e723ba41720e744a2fbd.tar.bz2
forums-51ef1ae346c08863d188e723ba41720e744a2fbd.tar.xz
forums-51ef1ae346c08863d188e723ba41720e744a2fbd.zip
[ticket/14831] Add more tests, better name for $e placeholder
PHPBB3-14831
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/phpbb/db/migration/tool/module.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/phpBB/phpbb/db/migration/tool/module.php b/phpBB/phpbb/db/migration/tool/module.php
index e8f2eaf80b..a543fd5cab 100644
--- a/phpBB/phpbb/db/migration/tool/module.php
+++ b/phpBB/phpbb/db/migration/tool/module.php
@@ -482,7 +482,7 @@ class module implements \phpbb\db\migration\tool\tool_interface
public function get_parent_module_id($parent_id, $data = '', $throw_exception = true)
{
// Initialize exception object placeholder
- $e = false;
+ $exception = false;
// Allow '' to be sent as 0
$parent_id = $parent_id ?: 0;
@@ -505,7 +505,7 @@ class module implements \phpbb\db\migration\tool\tool_interface
{
// No parent with the given module_langname exist
case 0:
- $e = new \phpbb\db\migration\exception('MODULE_NOT_EXIST', $parent_id);
+ $exception = new \phpbb\db\migration\exception('MODULE_NOT_EXIST', $parent_id);
break;
// Return the module id
@@ -527,7 +527,7 @@ class module implements \phpbb\db\migration\tool\tool_interface
$parent_id = (int) $this->db->sql_fetchfield('parent_id');
if (!$parent_id)
{
- $e = new \phpbb\db\migration\exception('PARENT_MODULE_FIND_ERROR', $data['parent_id']);
+ $exception = new \phpbb\db\migration\exception('PARENT_MODULE_FIND_ERROR', $data['parent_id']);
}
}
else if (!empty($data) && !is_array($data))
@@ -545,17 +545,17 @@ class module implements \phpbb\db\migration\tool\tool_interface
else
{
//Unable to get the parent module id, throwing an exception
- $e = new \phpbb\db\migration\exception('MODULE_EXIST_MULTIPLE', $parent_id);
+ $exception = new \phpbb\db\migration\exception('MODULE_EXIST_MULTIPLE', $parent_id);
}
break;
}
}
- if ($e !== false)
+ if ($exception !== false)
{
if ($throw_exception)
{
- throw $e;
+ throw $exception;
}
return false;
}