[TYPO3-core] Announcing TYPO3 4.5.18, 4.6.11 and 4.7.3

Markus Klein klein.t3 at mfc-linz.at
Thu Aug 9 13:17:28 CEST 2012


> 
> Hi!
> 
> 2012/8/9 Markus Klein <klein.t3 at mfc-linz.at>:
> > After spending more time on this "regression" I think this is not a regression.
> 
> Well, it is clearly a regression because it changes the behaviour in an unexpected way.
> 
> See Stefans example:
> 
> select.selectFields = pages.uid, pages.title
> 
> Old result: SELECT pages.uid, pages.title New result: SELECT pages.uid, pages.title, tt_content.uid as uid, tt_content.pid as pid,
> tt_content.t3ver_state as t3ver_state
[Markus Klein] Well, usually we fix a bug to achieve the wanted behavior. In this case, the intended functionality was always to NOT add the fields, when a * is present.
The new resulting query for Stefan's example is still valid. It still contains the two fields.
His problem was more the usage of the result.

> 
> > Before 4.6 the fields uid and pid were always added to the selectfields.
> > With [1] Björn added a patch for 4.6 which should refine this, by "Do
> > not add uid,pid,... to field list if the field list already contains a '*' or the repective field is in the list."
> > Until patch set 9 the code was:
> > if (isset($GLOBALS['TCA'][$table]) && !strstr($selectPart, '*')) {
> >
> > As Benjamin Mack correctly commented there: "strpos() !== FALSE is faster than strstr(), please modify"
> > Unfortunately this was "fixed" in patch set 10 with:
> > if (isset($GLOBALS['TCA'][$table]) && strpos($selectPart, '*')!==
> > FALSE) {
> 
> Good catch!
> 

Regards
Markus




More information about the TYPO3-team-core mailing list