View Issue Details

IDProjectCategoryView StatusLast Update
0004696OXID eShop (all versions)1. ----- eShop frontend -----public2012-12-10 14:37
Reporteraggrosoft Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionunable to reproduce 
Product Version4.6.5 revision 49955 
Summary0004696: SPLList implementation of oxList does not reset properly
DescriptionAs described in this bug

https://bugs.oxid-esales.com/view.php?id=4680

The wrong behavior seems to go even deeper and can lead to real server crashed and/or infinite loops. The most problematic thing is that doing a foreach multiple times in one template will crash, this is hard to debug but it can be easily reproduced.
Steps To ReproduceTry to add the following to basketcontents.tpl (inside of the basketitem loop):

[{assign var="oSelections" value=$basketproduct->getSelections(null,$basketitem->getSelList())}]
[{if $oSelections}]
     [{foreach from=$oSelections item=oList name=selections}]
     [{* do whatever you want here *}]
     [{/foreach}]
[{/if}]

[{* for demonstration purposes we do this again *}]
[{if $oSelections}]
     [{foreach from=$oSelections item=oList name=selections}]
     [{* do whatever you want here *}]
     [{/foreach}]
[{/if}]

[{* if the script still wont crash just do it again ... *}]
Additional InformationThe problem lies in the SPL Implementation of Iterator, I haven't found out what is going wrong there but using the plain array (through $oList->getArray()) for iteration in the template will not lead to problems.
TagsNo tags attached.
ThemeBoth
BrowserAll
PHP Versionany
Database Versionany

Activities

Linas Kukulskis

2012-11-09 12:27

reporter   ~0007800

forks fine;