Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • amam Friend
    #177281

    Hi,

    I am having a small issue that, though not affecting anything in the interface, it could become a problem:

    Issue: error when accessing one tag page.
    Error message: Warning: Invalid argument supplied for foreach() in (…)templatesja_lenshtmlcom_k2defaulttag.php on line 43
    Details: one of these messages shows up per item.

    The respective file says:
    foreach ($extra_fields as $key=>$extraField) {

    Is anyone else getting this error?

    Regards,
    Amin

    Saguaros Moderator
    #453955

    HI Amin,

    You can follow this way:

    – Open file: templatesja_lenshtmlcom_k2defaulttag.php

    – Add a new line before foreach:
    [PHP]if( !is_array($extra_fields)){ $extra_fields = array();} //<< add this line

    foreach ($extra_fields as $key=>$extraField) {
    if ($extraField->name == $xclass_key) {
    $xclass = $extraField->value;
    break;
    }
    }
    [/PHP]
    Hope this helps.

Viewing 2 posts - 1 through 2 (of 2 total)

This topic contains 2 replies, has 2 voices, and was last updated by  Saguaros 12 years, 6 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum