View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004696 | OXID eShop (all versions) | 1. ----- eShop frontend ----- | public | 2012-11-08 12:40 | 2012-12-10 14:37 |
Reporter | aggrosoft | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | unable to reproduce | ||
Product Version | 4.6.5 revision 49955 | ||||
Summary | 0004696: SPLList implementation of oxList does not reset properly | ||||
Description | As 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 Reproduce | Try 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 Information | The 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. | ||||
Tags | No tags attached. | ||||
Theme | Both | ||||
Browser | All | ||||
PHP Version | any | ||||
Database Version | any | ||||