CoreCommunity ExtensionsIncubatorDistributionsTYPO3 4.5 ProjectsTYPO3 4.6 ProjectsTYPO3 4.7 ProjectsTYPO3 6.0 ProjectsTYPO3 6.1 ProjectsTYPO3 6.2 Projects (+)

Bug #39000

bug in documentation += operator for array

Added by Krystian Szymukowicz 10 months ago. Updated 3 months ago.

Status:New Start date:2012-07-16
Priority:Must have Due date:
Assignee:Dmitry Dulepov % Done:

0%

Category:-
Target version:-
Votes: 4 (View)

Description

In documentation there is example

$conf += array(
        'pageParameterName' => $this->prefixId . '|page',
        'numberOfPages' => $numberOfPages,
    );

however it the parameter is already set in array its not replaced and this is the case for parameter 'pageParameterName'.

Instead of that is better to use:

$conf = array_merge($conf, array(
        'pageParameterName' => $this->prefixId . '|page',
        'numberOfPages' => $numberOfPages,
        ));

This += operator is used in several extensions like "comments" etc. Pagebrowse in those exts do not work anymore after upgrading to latest "pagebrowse" ext.

It was working before because of wrong parameter name in TS "pageParamName".
http://forge.typo3.org/issues/4886
This issue was solved but is causing the bug with += operator.

History

Updated by Tomasz Krawczyk 10 months ago

I had this problem too. Krystian's solution is working.

Updated by Oliver Wand 10 months ago

Just ran into the same problem on a 4.5.17 installation. Krystian's solution helped me out :-)

Also available in: Atom PDF