Ignore empty username matches
authorAlexander Ebert <ebert@woltlab.com>
Sun, 10 Jul 2016 22:09:27 +0000 (00:09 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sun, 10 Jul 2016 22:10:03 +0000 (00:10 +0200)
wcfsetup/install/files/lib/system/html/input/node/HtmlInputNodeTextParser.class.php

index ebdf26e86801b34e105c5c5617a597977a5ac73b..3052c16d24f7533bc7b3e4aeeb967c53769a1a9b 100644 (file)
@@ -186,6 +186,10 @@ class HtmlInputNodeTextParser {
                        // $i = 1 to skip the full match
                        for ($i = 1, $length = count($matches); $i < $length; $i++) {
                                for ($j = 0, $innerLength = count($matches[$i]); $j < $innerLength; $j++) {
+                                       if ($matches[$i][$j] === '') {
+                                               continue;
+                                       }
+                                       
                                        $username = $this->getUsername($matches[$i][$j]);
                                        if (!isset($usernames[$username])) {
                                                $usernames[$username] = $username;