Jump to content

ps_menutoplinks, error if laguage id not from 0


OlegT79

Recommended Posts

I have one language ID:4, and adding new menu point call error.

public static function updateUrl($links)
{
    /*
    for($i = 1; $i <= count($link); $i++) {
        if (substr($link[$i], 0, 7) !== "http://" && substr($link[$i], 0, 8) !== "https://") {
            $link[$i] = "http://" . $link[$i];
        }
    }
    */
    foreach ($links as $link){
        if (substr($link, 0, 7) !== "http://" && substr($link, 0, 8) !== "https://") {
            $link = "http://" . $link;
        }
    }
    return $link;
}
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...