From 5b45235c8c5a0bdfdf1c76e3d62e8500fd9d51cb Mon Sep 17 00:00:00 2001 From: Xavier Perseguers <xavier@typo3.org> Date: Mon, 19 Sep 2011 23:23:23 +0200 Subject: [PATCH] [BUGFIX] Some methods in t3lib_TSparser should be static A few methods in t3lib_TSparser are called statically but are not declared as being static. This leads to PHP notices. Change-Id: I7ea7cb659a830e74c4f8797f118662b517015614 Fixes: #30058 Releases: 4.6 Reviewed-on: http://review.typo3.org/5085 Reviewed-by: Xavier Perseguers Tested-by: Xavier Perseguers --- t3lib/class.t3lib_tsparser.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/t3lib/class.t3lib_tsparser.php b/t3lib/class.t3lib_tsparser.php index d3fb4e47eb74..9dcbcfa5efac 100644 --- a/t3lib/class.t3lib_tsparser.php +++ b/t3lib/class.t3lib_tsparser.php @@ -530,7 +530,7 @@ class t3lib_TSparser { * @return string Complete TypoScript with includes added. * @static */ - function checkIncludeLines($string, $cycle_counter = 1, $returnFiles = FALSE) { + public static function checkIncludeLines($string, $cycle_counter = 1, $returnFiles = FALSE) { $includedFiles = array(); if ($cycle_counter > 100) { t3lib_div::sysLog('It appears like TypoScript code is looping over itself. Check your templates for "<INCLUDE_TYPOSCRIPT: ..." tags', 'Core', 2); @@ -613,9 +613,9 @@ class t3lib_TSparser { * @param array Array with TypoScript in each value * @return array Same array but where the values has been parsed for include-commands */ - function checkIncludeLines_array($array) { + public static function checkIncludeLines_array($array) { foreach ($array as $k => $v) { - $array[$k] = t3lib_TSparser::checkIncludeLines($array[$k]); + $array[$k] = self::checkIncludeLines($array[$k]); } return $array; } @@ -629,7 +629,7 @@ class t3lib_TSparser { * @return string template content with uncommented include statements * @author Fabrizio Branca <typo3@fabrizio-branca.de> */ - function extractIncludes($string, $cycle_counter = 1, $extractedFileNames = array()) { + public static function extractIncludes($string, $cycle_counter = 1, $extractedFileNames = array()) { if ($cycle_counter > 10) { t3lib_div::sysLog('It appears like TypoScript code is looping over itself. Check your templates for "<INCLUDE_TYPOSCRIPT: ..." tags', 'Core', 2); @@ -744,7 +744,7 @@ class t3lib_TSparser { * @return array Same array but where the values has been processed with extractIncludes * @author Fabrizio Branca <typo3@fabrizio-branca.de> */ - function extractIncludes_array($array) { + public static function extractIncludes_array($array) { foreach ($array as $k => $v) { $array[$k] = t3lib_TSparser::extractIncludes($array[$k]); } -- GitLab