[BUGFIX] PHP_SCRIPT_INT unnecessarily requires parameter scriptSuffix
authorSteffen Gebert <steffen.gebert@typo3.org>
Tue, 5 Apr 2011 15:42:19 +0000 (17:42 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sat, 16 Apr 2011 12:19:57 +0000 (14:19 +0200)
Using PHP_SCRIPT_INT throws an Exception "Expected parameter
$conf['scriptSuffix'] was not given.", in its render() method.

As the parameter is useless and not used in other places, this check
can be removed.

Change-Id: I64fd656e0af78e711290aea597353c7194dd613d
Resolves: #25145
Releases: 4.6, 4.5
Reviewed-on: http://review.typo3.org/1466
Reviewed-by: Björn Pedersen
Reviewed-by: Susanne Moog
Tested-by: Susanne Moog
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/cms/tslib/class.tslib_content.php
typo3/sysext/cms/tslib/content/class.tslib_content_phpscriptinternal.php

index 746b4c3..9d167e5 100644 (file)
@@ -1125,7 +1125,6 @@ class tslib_cObj {
         */
        function PHP_SCRIPT($conf, $ext = '') {
                if ($ext === 'INT' || $ext === 'EXT') {
-                       $conf['scriptSuffix'] = $ext;
                        return $this->getContentObject('PHP_SCRIPT_INT')->render($conf);
                } else {
                        return $this->getContentObject('PHP_SCRIPT')->render($conf);
index 6051ae0..d275eff 100644 (file)
@@ -41,10 +41,6 @@ class tslib_content_PhpScriptInternal extends tslib_content_Abstract {
         * @return      string          Output
         */
        public function render($conf = array()) {
-               if (!is_array($conf) || empty($conf['scriptSuffix'])) {
-                       throw new InvalidArgumentException('Expected parameter $conf[\'scriptSuffix\'] was not given.', 1295705938);
-               }
-
                $file = isset($conf['file.'])
                        ? $this->cObj->stdWrap($conf['file'], $conf['file.'])
                        : $conf['file'];