[ticket/14234] Get rid of undefined variables

PHPBB3-14234
This commit is contained in:
Marc Alexander 2015-10-12 21:56:09 +02:00
parent 578ee077c1
commit 75e5e2471e
4 changed files with 8 additions and 20 deletions

View file

@ -1904,8 +1904,8 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
extract($phpbb_dispatcher->trigger_event('core.submit_post_modify_sql_data', compact($vars)));
$poll = $poll_ary;
$data = $data_ary;
unset($poll);
unset($data);
unset($poll_ary);
unset($data_ary);
// Submit new topic
if ($post_mode == 'post')

View file

@ -266,8 +266,6 @@ function compose_pm($id, $mode, $action, $user_folders = array())
*
* @event core.ucp_pm_compose_compose_pm_basic_info_query_before
* @var string sql String with the query to be executed
* @var array forum_list List of forums that contain the posts
* @var int visibility_const Integer with one of the possible ITEM_* constant values
* @var int msg_id topic_id in the page request
* @var int to_user_id The id of whom the message is to
* @var int to_group_id The id of the group whom the message is to
@ -276,14 +274,11 @@ function compose_pm($id, $mode, $action, $user_folders = array())
* @var string action One of: post, reply, quote, forward, quotepost, edit, delete, smilies
* @var bool delete Whether the user is deleting the PM
* @var int reply_to_all Value of reply_to_all request variable.
* @var string limit_time_sql String with the SQL code to limit the time interval of the post (Note: May be empty string)
* @var string sort_order_sql String with the ORDER BY SQL code used in this query
* @since 3.1.0-RC5
* @change 3.2.0-a1 Removed undefined variables
*/
$vars = array(
'sql',
'forum_list',
'visibility_const',
'msg_id',
'to_user_id',
'to_group_id',
@ -292,8 +287,6 @@ function compose_pm($id, $mode, $action, $user_folders = array())
'action',
'delete',
'reply_to_all',
'limit_time_sql',
'sort_order_sql',
);
extract($phpbb_dispatcher->trigger_event('core.ucp_pm_compose_compose_pm_basic_info_query_before', compact($vars)));
@ -338,7 +331,6 @@ function compose_pm($id, $mode, $action, $user_folders = array())
* @var string sql The original SQL used in the query
* @var array post Associative array with the data of the quoted post
* @var array msg_id The post_id that was searched to get the message for quoting
* @var int visibility_const Visibility of the quoted post (one of the possible ITEM_* constant values)
* @var int topic_id Topic ID of the quoted post
* @var int to_user_id Users the message is sent to
* @var int to_group_id Groups the message is sent to
@ -348,13 +340,12 @@ function compose_pm($id, $mode, $action, $user_folders = array())
* @var bool delete If deleting message
* @var int reply_to_all Value of reply_to_all request variable.
* @since 3.1.0-RC5
* @change 3.2.0-a1 Removed undefined variables
*/
$vars = array(
'sql',
'post',
'msg_id',
'visibility_const',
'topic_id',
'to_user_id',
'to_group_id',
'submit',

View file

@ -1256,7 +1256,6 @@ if ($submit || $preview || $refresh)
* @var array poll Array with poll data from post (must be used instead of the post_data equivalent)
* @var string mode What action to take if the form is submitted
* post|reply|quote|edit|delete|bump|smilies|popup
* @var string page_title Title of the mode page
* @var int post_id ID of the post
* @var int topic_id ID of the topic
* @var int forum_id ID of the forum
@ -1265,12 +1264,12 @@ if ($submit || $preview || $refresh)
* NOTE: Should be actual language strings, NOT language keys.
* @since 3.1.0-RC5
* @change 3.1.5-RC1 Added poll array to the event
* @change 3.2.0-a1 Removed undefined page_title
*/
$vars = array(
'post_data',
'poll',
'mode',
'page_title',
'post_id',
'topic_id',
'forum_id',
@ -1383,7 +1382,6 @@ if ($submit || $preview || $refresh)
* @var array data Array with post data going to be stored in the database
* @var string mode What action to take if the form is submitted
* post|reply|quote|edit|delete
* @var string page_title Title of the mode page
* @var int post_id ID of the post
* @var int topic_id ID of the topic
* @var int forum_id ID of the forum
@ -1393,13 +1391,13 @@ if ($submit || $preview || $refresh)
* NOTE: Should be actual language strings, NOT language keys.
* @since 3.1.0-RC5
* @changed 3.1.6-RC1 remove submit and error from event Submit and Error are checked previously prior to running event
* @change 3.2.0-a1 Removed undefined page_title
*/
$vars = array(
'post_data',
'poll',
'data',
'mode',
'page_title',
'post_id',
'topic_id',
'forum_id',
@ -1421,7 +1419,6 @@ if ($submit || $preview || $refresh)
* @var array data Array with post data going to be stored in the database
* @var string mode What action to take if the form is submitted
* post|reply|quote|edit|delete
* @var string page_title Title of the mode page
* @var int post_id ID of the post
* @var int topic_id ID of the topic
* @var int forum_id ID of the forum
@ -1432,13 +1429,13 @@ if ($submit || $preview || $refresh)
* NOTE: Should be actual language strings, NOT language keys.
* @since 3.1.0-RC5
* @changed 3.1.6-RC1 remove submit and error from event Submit and Error are checked previously prior to running event
* @change 3.2.0-a1 Removed undefined page_title
*/
$vars = array(
'post_data',
'poll',
'data',
'mode',
'page_title',
'post_id',
'topic_id',
'forum_id',

View file

@ -779,7 +779,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
$result = $db->sql_query($sql);
$result_topic_id = 0;
$rowset = array();
$rowset = $attachments = $topic_tracking_info = array();
if ($show_results == 'topics')
{