Does foreach() loop need unset($value)?
I don't see the unset in the current or older version of opencart. I've only found one instance of this in a third party mod.
I'm very inexperienced, but when I came across the documentation for foreach(), it says that unset($value) must be used to prevent the next foreach() from referencing the array in the previous foreach().
OC version. However, $var[$key] should be used instead of $value. Since this is about a third party extension you're referring about, contact the extension developer to resolve this issue. $var[$key] is especially useful when unsetting keys from super global variables. The OC core uses these lookups once-in-a-while.boopbeepforum wrote: ↑Tue May 18, 2021 11:54 pmDoes foreach() loop need unset($value)?
I don't see the unset in the current or older version of opencart. I've only found one instance of this in a third party mod.
I'm very inexperienced, but when I came across the documentation for foreach(), it says that unset($value) must be used to prevent the next foreach() from referencing the array in the previous foreach().
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Who is online
Users browsing this forum: MajorPain and 79 guests