Bug #31062
closedUnable to use token=0 for -> split
100%
Description
Due to an improper check on the token, it is not possible to use '0' (zero) as a splitting character. See the code below:
$conf['token'] = isset($conf['token.'])
? $this->stdWrap($conf['token'], $conf['token.'])
: $conf['token'];
if (!$conf['token']) {
return $value;
}
The part "if (!$conf['token'])" will return false if "$conf['token']" is set to 0 (zero). A solution like the following should solve the problem.
$conf['token'] = isset($conf['token.'])
? $this->stdWrap($conf['token'], $conf['token.'])
: $conf['token'];
if (!$conf['token'] && $conf['token'] != '0') {
return $value;
}
I will try to add a patch later today.
Updated by Markus Klein about 13 years ago
Just change the if to:
if ($conf['token'] === '')
Updated by Steffen Ritter about 13 years ago
- Status changed from New to Accepted
- Complexity set to no-brainer
Hi Sebastian,
thanks four your report.
Even if this seems to be a rare case it is a valid one.
Mind to push a patch to gerrit (for 4.5 and 4.6) with the chack Markus Klein came up with?
Updated by Markus Klein about 13 years ago
Hi from my side too.
Sorry for posting only such a short message, but I just stumbled over this one in my mails, saw this line and posted the code chunk.
As Steffen already said: Thanks for reporting!
If you need any assistance in pushing a patch, just let me know.
Good thing to start, as always: http://wiki.typo3.org/Contribution_Walkthrough
Thanks.
Updated by Sebastiaan de Jonge about 13 years ago
I'm a bit new to Git I have to admit (it rhymes even). I'll read through the docs and hopefully push the patch somewhere tomorrow. Thanks for the walkthrough Markus.
Cheers
Updated by Mr. Hudson about 13 years ago
- Status changed from Accepted to Under Review
Patch set 1 of change I9f5110ac9c0873a04fbc8845b126cfe477977f94 has been pushed to the review server.
It is available at http://review.typo3.org/6171
Updated by Mr. Hudson about 13 years ago
Patch set 2 of change I9f5110ac9c0873a04fbc8845b126cfe477977f94 has been pushed to the review server.
It is available at http://review.typo3.org/6171
Updated by Mr. Hudson about 13 years ago
Patch set 1 of change I35f997ba166e80d4d504bca02eeb10784b1a6117 has been pushed to the review server.
It is available at http://review.typo3.org/6194
Updated by Mr. Hudson about 13 years ago
Patch set 1 of change If303f704ffa8d5d1a4c9df28c9e4c3759ef9ebfc has been pushed to the review server.
It is available at http://review.typo3.org/6195
Updated by Steffen Gebert about 13 years ago
- Assignee set to Steffen Gebert
- Target version set to 4.5.8
- TYPO3 Version changed from 4.5 to 4.4
Updated by Steffen Gebert about 13 years ago
- Target version changed from 4.5.8 to 4.4.12
Updated by Steffen Gebert about 13 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 64380de223c362ca4271cbcbbe5a54d197e5bbba.
Updated by Riccardo De Contardi about 7 years ago
- Status changed from Resolved to Closed