View Issue Details

IDProjectCategoryView StatusLast Update
0005012OXID eShop (all versions)4.07. Source code, Testpublic2013-04-02 17:45
ReporterAndreHerrmann 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version4.7.3 / 5.0.3 revision 54408 
Target VersionFixed in Version4.7.5 / 5.0.5 
Summary0005012: oxTagCloud getTagLink Method needs an isset-check
DescriptionHi there,

in oxtagcloud I see the following code :


public function getTagLink( $sTag )
{
    $aCloudArray = $this->getCloudArray();
    return $aCloudArray[$sTag]->getLink();
}

Before returning something it should be checked via isset()

pseudocode:
public function getTagLink( $sTag )
{
    $aCloudArray = $this->getCloudArray();
    if ( isset( $aCloudArray[$sTag] ) ) {
        return $aCloudArray[$sTag]->getLink();
    }
    else {
        // return std link or whatever you have foreseen for this case
    }
}

Even if this is marked as deprecated it still should work as expected i think.

BTW: Which would be the alternative to get a certain seo link of a tag name?
Steps To ReproduceUse a tag name which is not in the cloud array.
TagsNo tags attached.
ThemeBoth
BrowserAll
PHP Versionany
MySQL Versionany

Activities

mantas.vaitkunas

2013-03-22 15:48

administrator   ~0008527

Hello,

now getTagLink() functionality moved to oxTag class. So You should use oxTag::getLink(). Deprecated function description will be extended.

mantas.vaitkunas

2013-04-02 12:32

administrator   ~0008547

Deprecated function description was extended.