[BUGFIX] Add missing isset() check in HTMLParser 15/37115/2
authorMarkus Klein <klein.t3@reelworx.at>
Mon, 23 Feb 2015 15:23:47 +0000 (16:23 +0100)
committerMarkus Klein <klein.t3@reelworx.at>
Mon, 23 Feb 2015 15:48:30 +0000 (16:48 +0100)
This is a regression fix for #54091.
It has been forgotten to add an isset() check for 'fixAttrib.set'.

Releases: master
Resolves: #65239
Change-Id: Ia39ef0760dab61bdb5bbfb71e525cc96e15f3077
Reviewed-on: http://review.typo3.org/37115
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
Reviewed-by: Andreas Fernandez <andreas.fernandez@aspedia.de>
Tested-by: Andreas Fernandez <andreas.fernandez@aspedia.de>
typo3/sysext/core/Classes/Html/HtmlParser.php

index 615ccbf..7bcc385 100644 (file)
@@ -803,7 +803,7 @@ class HtmlParser {
                                                                        $tagAttrib = $this->get_tag_attributes($tagParts[1]);
                                                                        $tagParts[1] = '';
                                                                        foreach ($tags[$tagName]['fixAttrib'] as $attr => $params) {
-                                                                               if ($params['set'] !== '') {
+                                                                               if (isset($params['set']) && $params['set'] !== '') {
                                                                                        $tagAttrib[0][$attr] = $params['set'];
                                                                                }
                                                                                if (!empty($params['unset'])) {
@@ -1085,7 +1085,7 @@ class HtmlParser {
                $content = implode('', $parts);
                // Fix <style> section:
                $prefix = isset($alternatives['style']) ? $alternatives['style'] : $main_prefix;
-               if ($prefix !== '') {
+               if ((string)$prefix !== '') {
                        $parts = $this->splitIntoBlock('style', $content);
                        foreach ($parts as $k => &$part) {
                                if ($k % 2) {