Project

General

Profile

Actions

Feature #37662

closed

Support for arrays in t3lib_div::_GP()

Added by Rastislav Birka almost 12 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2012-06-01
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

example situation:
$_GET => array(
'test' => array(
'0' => 'X'
'1' => 'Y'
'2' => 'Z'
)
)
$_POST => array(
'test' => array(
'1' => 'A'
)
)

in this case t3lib_div::_GP('test') return:
array(
'1' => 'A'
)

correct result should be:
array(
'0' => 'X'
'1' => 'A'
'2' => 'Z'
)


Files

t3lib_div_GP.diff (615 Bytes) t3lib_div_GP.diff Rastislav Birka, 2012-06-01 06:58
Actions #1

Updated by Jigal van Hemert almost 12 years ago

  • Status changed from New to Needs Feedback
  • Assignee deleted (Michael Stucki)

The effect you describe is already available in t3lib_div::_GPmerged(). Why would you expect t3lib_div::_GP() to behave differently than described?

(Note: please don't assign issues to somebody else; people are expected to assign an issue to themselves once they start working on it)

Actions #2

Updated by Rastislav Birka almost 12 years ago

Then it's needed to change function getVariableCommon in class.t3lib_matchcondition_abstract.php, because there is $value = t3lib_div::_GP($k); used, so in this case is not possible to use condition for value from array, e.g. condition [globalVar = GP:test|2 = Z] will be always false
and i'm not sure about other functions in core where is used t3lib_div::_GP, maybe in some is used t3lib_div::_GP for value from array too...

Actions #3

Updated by Alexander Opitz almost 11 years ago

Hi,

as this issue is very old. Does the problem still exists within newer versions of TYPO3 CMS (4.5 or 6.1)?

Actions #4

Updated by Rastislav Birka over 10 years ago

yes, problem still exists:
version 4.7.14
file: class.t3lib_matchcondition_abstract.php
function: protected function getVariableCommon(array $vars)
line 433: $value = t3lib_div::_GP($k);

version 6.1.3:
file: AbstractConditionMatcher.php
function: protected function getVariableCommon(array $vars)
line 433: $value = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP($k);

Actions #5

Updated by Alexander Opitz over 10 years ago

Can you update your patch against current master and push it to gerrit?

Actions #6

Updated by Alexander Opitz over 10 years ago

Can you please update your patch against current master and push it to gerrit?

Actions #7

Updated by Markus Klein over 9 years ago

Rastislav, last chance to get this forward.
Are you able to push a patch for current master branch?

Actions #8

Updated by Alexander Opitz over 9 years ago

  • Status changed from Needs Feedback to Closed

No feedback within the last 90 days => closing this issue.

If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.

Actions

Also available in: Atom PDF