Issue Bug Closed

#18032using addQueryString couses wrong cHash on pages with no query string

Vladimir Podkovanov 01/21/08, 01:18 updated 10/29/08, 19:01

Description

After moving site to new server I’ve find out that some pages does not getting cached anymore though on previous server they does. Then I traced it to next:
- lets say you use typolink function with addQueryString and additionalParams properties set
- then the conf getting processed in class.tslib_content.php::typoLink
- there is a call to class.tslib_content.php::getQueryArguments, BUT if the current page has no query string then you got only ‘&’ string out of the method
- and after this it is glued with additionalParams string so you get string like this ‘&&param=value…‘
- then it is passed to t3lib_div::cHashParams and becouse of double ampersands we get one empty key with empty value in result array
- and then it is passed to t3lib_div::shortMD5(serialize(…))
- and then we GOT WRONG cHash because that ‘&&’ coused an empty key/value in cHashParams array

looks like PHP ver 4.4.7 that I got on new server serializes that empty value in array and an old version does not so the bug revealed only after moving

PHP version 4.4.7
(issue imported from #M7230)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.