1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-01 14:30:32 +02:00

Merge branch '3.1.x' into 3.2.x

* 3.1.x:
  [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:
Tristan Darricau
2016-10-03 20:20:54 +02:00
2 changed files with 17 additions and 1 deletions

View File

@@ -1860,7 +1860,7 @@ class parse_message extends bbcode_firstpass
// Parse Poll Option text
$tmp_message = $this->message;
$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']);
foreach ($poll['poll_options'] as &$poll_option)