Issue Bug Closed

#43109substituteMarkerArrayCached replaces only the first identical marker

Franz Holzinger 11/19/12, 17:39 updated 11/19/12, 18:07

Description

If a framework text contains a marker twice, then only the firs occurence of it is replaced.

I have written this test PHP, which works in the file view/class.tx_ttproducts_basket_view.php of tt_products 2.6.x..

// TEST START
$frameWork = ‘


Ihre Bestellung ist vom ###ORDER_DATE###.

Sie köen ihre Bestellung mit der Auftragsstatusnummer:###ORDER_TRACKING_NO### verfolgen.Klicken sie hier um den Status zum jetzigen Zeitpunkt zu sehen.


‘;
$testMarkerArray = array();
$testSubpartArray = array();
$testWrappedSubpartArray = array();
$testMarkerArray[‘###ORDER_TRACKING_NO###’] = ‘testOrderTrackingNumber’;
$testMarkerArray[‘###ORDER_DATE###’] = ’19.11.2012’;
$testContent = $this->pibase->cObj->substituteMarkerArrayCached($frameWork,$testMarkerArray,$testSubpartArray,$testWrappedSubpartArray);

// TEST ENDE

The result is:


Ihre Bestellung ist vom 19.11.2012.

Sie köen ihre Bestellung mit der Auftragsstatusnummer:testOrderTrackingNumber verfolgen.Klicken sie hier um den Status zum jetzigen Zeitpunkt zu sehen.


The second marker of ###ORDER_TRACKING_NO## is not replaced.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.