Follow-up to #16395: no warning if "namespaces" is not defined in config
authorErnesto Baschny <ernst@cron-it.de>
Wed, 17 Nov 2010 14:08:18 +0000 (14:08 +0000)
committerErnesto Baschny <ernst@cron-it.de>
Wed, 17 Nov 2010 14:08:18 +0000 (14:08 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@9455 709f56b5-9817-0410-a4d7-c38de5d9e867

typo3/sysext/cms/tslib/class.tslib_pagegen.php

index bc00651..086e45f 100644 (file)
@@ -448,8 +448,10 @@ See <a href="http://wiki.typo3.org/index.php/TYPO3_3.8.1" target="_blank">wiki.t
                }
                if ($GLOBALS['TSFE']->xhtmlVersion || $doctype === 'html_5') {
                        $htmlTagAttributes['xmlns'] = 'http://www.w3.org/1999/xhtml'; // We add this to HTML5 to achieve a slightly better backwards compatibility
-                       foreach ($GLOBALS['TSFE']->config['config']['namespaces.'] as $prefix => $uri) {
-                               $htmlTagAttributes['xmlns:' . htmlspecialchars($prefix)] = $uri; // $uri gets htmlspecialchared later
+                       if (is_array($GLOBALS['TSFE']->config['config']['namespaces.'])) {
+                               foreach ($GLOBALS['TSFE']->config['config']['namespaces.'] as $prefix => $uri) {
+                                       $htmlTagAttributes['xmlns:' . htmlspecialchars($prefix)] = $uri; // $uri gets htmlspecialchared later
+                               }
                        }
                }