[TYPO3-core] RFC #9533: substituteMarkerArrayCached is too strict for older extensions
Ernesto Baschny [cron IT]
ernst at cron-it.de
Fri Oct 10 15:03:33 CEST 2008
This is an SVN patch request.
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug-9533-substituteMarkerArrayCached-typehinting.diff
Type: text/x-diff
Size: 2262 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20081010/fcaa1552/attachment.diff
More information about the TYPO3-team-core
mailing list