From 073f4824ac344dbd7cdbb2a949866a1ecef39a9d Mon Sep 17 00:00:00 2001 From: Tom Beddard Date: Sun, 26 Feb 2006 08:38:27 +0000 Subject: [PATCH] Fixed undefined poll and topic_attachment variables when editing posts. git-svn-id: file:///svn/phpbb/trunk@5588 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/posting.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/phpBB/posting.php b/phpBB/posting.php index f1e47570bb..4aa20b2d64 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -1507,13 +1507,13 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u 'topic_first_poster_name' => stripslashes($username), 'topic_type' => $topic_type, 'topic_time_limit' => ($topic_type == POST_STICKY || $topic_type == POST_ANNOUNCE) ? ($data['topic_time_limit'] * 86400) : 0, - 'poll_title' => ($poll['poll_options']) ? $poll['poll_title'] : '', - 'poll_start' => ($poll['poll_options']) ? (($poll['poll_start']) ? $poll['poll_start'] : $current_time) : 0, - 'poll_max_options' => ($poll['poll_options']) ? $poll['poll_max_options'] : 1, - 'poll_length' => ($poll['poll_options']) ? ($poll['poll_length'] * 86400) : 0, - 'poll_vote_change' => $poll['poll_vote_change'], + 'poll_title' => (isset($poll['poll_options'])) ? $poll['poll_title'] : '', + 'poll_start' => (isset($poll['poll_options'])) ? (($poll['poll_start']) ? $poll['poll_start'] : $current_time) : 0, + 'poll_max_options' => (isset($poll['poll_options'])) ? $poll['poll_max_options'] : 1, + 'poll_length' => (isset($poll['poll_options'])) ? ($poll['poll_length'] * 86400) : 0, + 'poll_vote_change' => (isset($poll['poll_vote_change'])) ? $poll['poll_vote_change'] : 0, - 'topic_attachment' => ($post_mode == 'edit_topic') ? ((isset($data['filename_data']['physical_filename']) && sizeof($data['filename_data'])) ? 1 : 0) : $data['topic_attachment'] + 'topic_attachment' => ($post_mode == 'edit_topic') ? ((isset($data['filename_data']['physical_filename']) && sizeof($data['filename_data'])) ? 1 : 0) : (isset($data['topic_attachment']) ? $data['topic_attachment'] : 0) ); break; }