aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2015-01-24 13:53:22 +0100
committerMarc Alexander <admin@m-a-styles.de>2015-02-21 17:43:15 +0100
commit12fe882741db91a155620d5870c6127798125720 (patch)
treef6ba6ddbca72701f2c067612daad2243e6ce483d /phpBB
parent874f3584e2713cd332215b159b740e53330a900c (diff)
downloadforums-12fe882741db91a155620d5870c6127798125720.tar
forums-12fe882741db91a155620d5870c6127798125720.tar.gz
forums-12fe882741db91a155620d5870c6127798125720.tar.bz2
forums-12fe882741db91a155620d5870c6127798125720.tar.xz
forums-12fe882741db91a155620d5870c6127798125720.zip
[ticket/13522] Trim array elements before processing further
PHPBB3-13522
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/phpbb/captcha/plugins/qa.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/phpBB/phpbb/captcha/plugins/qa.php b/phpBB/phpbb/captcha/plugins/qa.php
index 12da64c750..824e6db3b0 100644
--- a/phpBB/phpbb/captcha/plugins/qa.php
+++ b/phpBB/phpbb/captcha/plugins/qa.php
@@ -830,12 +830,11 @@ class qa
// Convert answers into array and filter if answers are set
if (strlen($answers))
{
- $answers = array_filter(explode("\n", $answers), function ($value) {
- return trim($value) !== '';
+ $answers = array_filter(array_map('trim', explode("\n", $answers)), function ($value) {
+ return $value !== '';
});
}
-
$question = array(
'question_text' => request_var('question_text', '', true),
'strict' => request_var('strict', false),