Feature #37662
closed
Support for arrays in t3lib_div::_GP()
Added by Rastislav Birka over 12 years ago.
Updated almost 10 years ago.
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
- 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)
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...
Hi,
as this issue is very old. Does the problem still exists within newer versions of TYPO3 CMS (4.5 or 6.1)?
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);
Can you update your patch against current master and push it to gerrit?
Can you please update your patch against current master and push it to gerrit?
Rastislav, last chance to get this forward.
Are you able to push a patch for current master branch?
- 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.
Also available in: Atom
PDF