[TYPO3-core] RFC #9533: substituteMarkerArrayCached is too strict for older extensions

Ernesto Baschny [cron IT] ernst at cron-it.de
Mon Oct 13 10:44:42 CEST 2008


Hi,

commited to trunk (rev. 4307).

Cheers,
Ernesto

Ernesto Baschny [cron IT] wrote: on 10.10.2008 15:03:

> Type: Backwards compatibility issue
> 
> Bugtracker references:
> http://bugs.typo3.org/view.php?id=9533
> 
> Branches: trunk
> 
> Problem:
> Many extensions using substituteMarkerArrayCached will fail in 4.3 as
> the function changed to strict array type hinting. All arguments has to
> be an array, otherwise you get following error:
> 
> Catchable fatal error: Argument [2,3,4] passed to
> tslib_cObj::substituteMarkerArrayCached() must be an array, null given
> 
> There is already a discussion about this issue in the -dev list, please
> read the thread there first ("Extensions need update for 4.3!" from
> Steffen Kamper) to get the idea and different opinions.
> 
> 
> Solution:
> After some discussion in the -dev list, the idea came up to keep the
> type hinting but to allow the special case "null" (also uninitialized
> variable) to keep older extensions happy but to "punish" extensions that
> were passing integers, strings or booleans to these parameters.
> 
> I also added some more documentation comments for clarity what "caching"
> means in the context of substituteMarkerArrayCached, as most people
> aren't really aware of when it is useful.
> 
> 
> Notes:
> Thanks for Steffen Kamper for reporting.
> 
> Issue was introduced almost "silently" in Bug#9283 (rev 4129
> http://forge.typo3.org/repositories/revision/typo3v4-core/4129) as a
> "cleanup" by Ingo.
> 
> Cheers,
> Ernesto


More information about the TYPO3-team-core mailing list