Fixed bug 16780: PHP warning in any system BE module
authorSteffen Kamper <info@sk-typo3.de>
Mon, 20 Dec 2010 11:51:41 +0000 (11:51 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Mon, 20 Dec 2010 11:51:41 +0000 (11:51 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@9858 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_extmgm.php

index 50933f7..1a3d67d 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-12-20  Steffen Kamper  <steffen@typo3.org>
+
+       * Fixed bug 16780: PHP warning in any system BE module
+
 2010-12-19  Steffen Gebert  <steffen@steffen-gebert.de>
 
        * Follow-up to #16779: t3lib_cache_backend_RedisBackendTest causes t3lib_db_PreparedStatementTest tests to fail (Thanks to Oliver Klee)
index c2efdab..dd589f0 100644 (file)
@@ -312,31 +312,31 @@ final class t3lib_extMgm {
                                                $positionArray = t3lib_div::trimExplode(':', $position);
                                                if ($positionArray[0] == 'replace') {
                                                        foreach ($GLOBALS['TCA'][$table]['palettes'] as $palette => $paletteDetails) {
-                                                               if (preg_match('/\b' . $palette . '\b/', $typeDetails['showitem']) != FALSE
-                                                                               && preg_match('/\b' . $positionArray[1] . '\b/', $paletteDetails['showitem']) != FALSE) {
+                                                               if (preg_match('/\b' . $palette . '\b/', $typeDetails['showitem']) !== FALSE
+                                                                               && preg_match('/\b' . $positionArray[1] . '\b/', $paletteDetails['showitem']) !== FALSE) {
                                                                        self::addFieldsToPalette($table, $palette, $str, $position);
                                                                        $fieldExists = TRUE;
                                                                }
                                                        }
                                                } else {
-                                                       if (strstr($str, $typeDetails['showitem']) != FALSE) {
+                                                       if (strpos($typeDetails['showitem'], $str) !== FALSE) {
                                                                $fieldExists = TRUE;
                                                        } else {
                                                                foreach ($GLOBALS['TCA'][$table]['palettes'] as $palette => $paletteDetails) {
                                                                        if (preg_match('/\b' . $palette . '\b/', $typeDetails['showitem']) != FALSE
-                                                                       && preg_match('/\b' . $positionArray[1] . '\b/', $paletteDetails['showitem']) != FALSE) {
+                                                                       && preg_match('/\b' . $positionArray[1] . '\b/', $paletteDetails['showitem']) !== FALSE) {
                                                                                $position = $positionArray[0] . ':--palette--;;' . $palette;
                                                                        }
                                                                }
                                                        }
                                                }
                                        } else {
-                                               if (strstr($str, $typeDetails['showitem']) != FALSE) {
+                                               if (strpos($typeDetails['showitem'], $str) !== FALSE) {
                                                        $fieldExists = TRUE;
                                                } else if(is_array($GLOBALS['TCA'][$table]['palettes'])) {
                                                        foreach ($GLOBALS['TCA'][$table]['palettes'] as $palette => $paletteDetails) {
                                                                if (preg_match('/\b' . $palette . '\b/', $typeDetails['showitem']) != FALSE
-                                                               && strstr($str, $paletteDetails['showitem']) != FALSE) {
+                                                               && strpos($paletteDetails['showitem'], $str) !== FALSE) {
                                                                        $fieldExists = TRUE;
                                                                }
                                                        }