View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0005812 | OXID eShop (all versions) | 4.07. Source code, Test | public | 2014-07-08 14:37 | 2024-09-16 15:17 |
| Reporter | ClemensSahs | Assigned To | |||
| Priority | normal | Severity | major | Reproducibility | always |
| Status | resolved | Resolution | won't fix | ||
| Product Version | 4.6.8 | ||||
| Summary | 0005812: $iLinkType is not exists in oxSimpleVariant::getBaseStdLink | ||||
| Description | this code looks like a copy/parse from oxSimpleVariant::getStdLink https://github.com/OXID-eSales/oxideshop_ce/blob/b-dev-ce/source/application/models/oxsimplevariant.php#L333-L343 | ||||
| Additional Information | Affected methods: \OxidEsales\EshopCommunity\Application\Model\SimpleVariant::getBaseStdLink \OxidEsales\EshopCommunity\Application\Model\SimpleVariant::getBaseSeoLink | ||||
| Tags | Variants | ||||
| Attached Files | |||||
| Theme | Not defined | ||||
| Browser | Not defined | ||||
| PHP Version | Not defined | ||||
| Database Version | Not defined | ||||
|
|
same situation in: - oxSimpleVariant::getBaseSeoLink |
|
|
I just had an interesting conversation about this with our Core team and this will be refactored in a future release. This is not really a bug (although it is a bit dirty). It acts as a kind of request cache for getBaseStdLink for the SimpleVariant class. The first time in a request this is called, $iLinkType is indeed undefined which makes the condition true. This leads to the variable being set so the next call within this class will result in a skip of this part, because null is indeed a valid array key for PHP. Of course this will lead to a PHP warning anyway. |