osCommerce / oscommerce2

osCommerce Online Merchant v2.x
http://www.oscommerce.com
MIT License
281 stars 222 forks source link

V2.4 $matches in OSCOM no value #608

Open oitsuki opened 6 years ago

oitsuki commented 6 years ago

If you try to activate the url rewriting in administration, it does'nt work.

I noted that $matches has any value

OSCOM.php

    public static function link($page, $parameters = null, $add_session_id = true, $search_engine_safe = true)
    {
        $page = HTML::sanitize($page);

        $site = $req_site = static::$site;

        if ((strpos($page, '/') !== false) && (preg_match('/^([A-Z][A-Za-z0-9-_]*)\/(.*)$/', $page, $matches) === 1) && OSCOM::siteExists($matches[1], false)) {
            $req_site = $matches[1];
            $page = $matches[2];
        }