Project

General

Profile

Actions

Bug #31062

closed

Unable to use token=0 for -> split

Added by Sebastiaan de Jonge over 12 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Category:
TypoScript
Target version:
Start date:
2011-10-18
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.4
PHP Version:
Tags:
Complexity:
no-brainer
Is Regression:
Sprint Focus:

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.

Actions #1

Updated by Markus Klein over 12 years ago

Just change the if to:

if ($conf['token'] === '')

Actions #2

Updated by Steffen Ritter over 12 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?

Actions #3

Updated by Markus Klein over 12 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.

Actions #4

Updated by Sebastiaan de Jonge over 12 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

Actions #5

Updated by Mr. Hudson over 12 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

Actions #6

Updated by Mr. Hudson over 12 years ago

Patch set 2 of change I9f5110ac9c0873a04fbc8845b126cfe477977f94 has been pushed to the review server.
It is available at http://review.typo3.org/6171

Actions #7

Updated by Mr. Hudson over 12 years ago

Patch set 1 of change I35f997ba166e80d4d504bca02eeb10784b1a6117 has been pushed to the review server.
It is available at http://review.typo3.org/6194

Actions #8

Updated by Mr. Hudson over 12 years ago

Patch set 1 of change If303f704ffa8d5d1a4c9df28c9e4c3759ef9ebfc has been pushed to the review server.
It is available at http://review.typo3.org/6195

Actions #9

Updated by Steffen Gebert over 12 years ago

  • Assignee set to Steffen Gebert
  • Target version set to 4.5.8
  • TYPO3 Version changed from 4.5 to 4.4
Actions #10

Updated by Steffen Gebert over 12 years ago

  • Target version changed from 4.5.8 to 4.4.12
Actions #11

Updated by Steffen Gebert over 12 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #12

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF