Fixed bug #16308: displayEditIcons expects array, null given (Thanks to Daniel Müller)
authorSusanne Moog <typo3@susannemoog.de>
Sat, 1 Jan 2011 16:50:49 +0000 (16:50 +0000)
committerSusanne Moog <typo3@susannemoog.de>
Sat, 1 Jan 2011 16:50:49 +0000 (16:50 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@9977 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/cms/tslib/class.tslib_content.php
typo3/sysext/cms/tslib/content/class.tslib_content_imagetext.php
typo3/sysext/css_styled_content/pi1/class.tx_cssstyledcontent_pi1.php

index 21f470e..1bc745d 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2011-01-01  Susanne Moog  <typo3@susanne-moog.de>
+
+       * Fixed bug #16308: displayEditIcons expects array, null given (Thanks to Daniel Müller)
+
 2010-12-31  Christian Kuhn  <lolli@schwarzbu.ch>
 
        * Fixed bug #16231: Mail not sent if safe mode is on (Thanks to Boris Gulay)
index 3b4ebb3..2a919e5 100644 (file)
@@ -3168,7 +3168,10 @@ class tslib_cObj {
         * @return      string          The processed input value
         */
        public function stdWrap_editIcons($content = '', $conf = array()) {
-               if ($GLOBALS['TSFE']->beUserLogin) {
+               if ($GLOBALS['TSFE']->beUserLogin && $conf['editIcons']) {
+                       if(!is_array($conf['editIcons.'])) {
+                               $conf['editIcons.'] = array();
+                       }
                        $content = $this->editIcons($content, $conf['editIcons'], $conf['editIcons.']);
                }
                return $content;
@@ -7767,7 +7770,7 @@ class tslib_cObj {
         * @param       string          Additional URL parameters for the link pointing to alt_doc.php
         * @return      string          The input content string, possibly with edit icons added (not necessarily in the end but just after the last string of normal content.
         */
-       function editIcons($content, $params, $conf = array(), $currentRecord = '', $dataArr = array(), $addUrlParamStr = '') {
+       function editIcons($content, $params, array $conf = array(), $currentRecord = '', $dataArr = array(), $addUrlParamStr = '') {
                if ($GLOBALS['TSFE']->beUserLogin && ($GLOBALS['BE_USER']->frontendEdit instanceof t3lib_frontendedit)) {
                        if (!$currentRecord) {
                                $currentRecord = $this->currentRecord;
index 26cc6da..b155767 100644 (file)
@@ -398,6 +398,9 @@ class tslib_content_ImageText extends tslib_content_Abstract {
                                + $cap;
 
                                // Edit icons:
+                       if (!is_array($conf['editIcons.'])) {
+                               $conf['editIcons.'] = array();
+                       }
                        $editIconsHTML = $conf['editIcons'] && $GLOBALS['TSFE']->beUserLogin
                                ? $this->cObj->editIcons('', $conf['editIcons'], $conf['editIcons.'])
                                : '';
index 7c9889f..492b3f5 100755 (executable)
@@ -772,6 +772,9 @@ class tx_cssstyledcontent_pi1 extends tslib_pibase {
                }
 
                        // Edit icons:
+               if (!is_array($conf['editIcons.'])) {
+                       $conf['editIcons.'] = array();
+               }
                $editIconsHTML = $conf['editIcons']&&$GLOBALS['TSFE']->beUserLogin ? $this->cObj->editIcons('',$conf['editIcons'],$conf['editIcons.']) : '';
 
                        // If noRows, we need multiple imagecolumn wraps