[TYPO3-core] RFC Bug #11239: typolink: addQueryString.exclude does not support arrays

Christian Kuhn lolli at schwarzbu.ch
Sun Feb 7 21:27:58 CET 2010


Reminder #3

Christian Kuhn wrote:
> This is a SVN patch request.
> 
> Type: Bugfix
> 
> Branches: 4.3, trunk
> 
> BT ref: http://bugs.typo3.org/view.php?id=11239
> 
> Problem:
> getQueryArguments() in tslib_content has several issues:
> - The method reacts differently if $conf['method'] is set or not. This 
> is because t3lib_div::_GET / _POST returns multidimensional arrays, but 
> the default QUERY_STRING is exploded to a one dimensional array instead. 
> Thus $conf['exclude'] doesn't work if $conf['method'] is set.
> - forceArgs doesn't work if $conf['exclude'] is not set.
> - overruleArgs doesn't work if $conf['exclude'] is not set.
> 
> Solution:
> - Add a new helper method to t3lib_div to diff multi dimensional arrays
> - Explode the return value of t3lib_div::getIndpEnv('QUERY_STRING') to 
> the same multi dimensional array that t3lib_div::_GET() and friends return
> - Fix handling of forceArgs and overruleArgs
> 
> Notes:
> - This fix is practically a rewrite of getQueryArguments (making it much 
> shorter and better understandable).
> - There is one possible drawback that might not work exactly as before, 
> if you feed the method with an overruleArray like
> $overruleArray = array(
>     'key1[key11]' = 'value11'
> );
> This is not handled after the patch, it expects:
> $overruleArray = array(
>     'key1' => array(
>         'key11' => 'value11'
>     ),
> );
> There was no documentation for this edge case, but I'm unsure about 4.3 
> because of this. Any opinions? Is this a real issue for extensions? 
> Should we add some workaround for this case?
> - getQueryArguments() is practically a static method, I added the 
> public, but not the static keyword to not break backwards compatibility.
> - The patch set comes with test cases which feed the method with edge 
> cases to show what exactly didn't work and what is working after 
> applying the patch. Enjoy.


More information about the TYPO3-team-core mailing list