mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
Merge pull request #4471 from dsinn/ticket/14802
[ticket/14802] Empty/blank lines should not be additional poll options * dsinn/ticket/14802: [ticket/14802] Add test for empty/blank lines in poll options [ticket/14802] Empty/blank lines should not be additional poll options
This commit is contained in:
@@ -1822,7 +1822,7 @@ class parse_message extends bbcode_firstpass
|
||||
$this->message = $poll['poll_title'];
|
||||
$this->bbcode_bitfield = $bbcode_bitfield;
|
||||
|
||||
$poll['poll_options'] = explode("\n", trim($poll['poll_option_text']));
|
||||
$poll['poll_options'] = preg_split('/\s*?\n\s*/', trim($poll['poll_option_text']));
|
||||
$poll['poll_options_size'] = sizeof($poll['poll_options']);
|
||||
|
||||
if (!$poll['poll_title'] && $poll['poll_options_size'])
|
||||
|
Reference in New Issue
Block a user