Analysis error: syntax error, unexpected "public" (T_PUBLIC)

I changed something in my "redirect base url" settings on the magento admin page. However, this did not work out so well. After that, I got the following error:

Analysis error: syntax error, unexpected "public" (T_PUBLIC) in .... / public _html / app / code / core / Mage / Core / Model / Config.php on line 662

With code:

public function setNode($path, $value, $overwrite = true)
{
    if ($this->_useCache && ($path !== null)) {
        $sectionPath = explode('/', $path);
        $config = $this->_getSectionConfig($sectionPath);
        if ($config) {
            $sectionPath = array_slice($sectionPath, $this->_cacheSections[$sectionPath[0]]+1);
            $sectionPath = implode('/', $sectionPath);
            $config->setNode($sectionPath, $value, $overwrite);
        }
    }
    return parent::setNode($path, $value, $overwrite);
}

I can not understand the problem myself, as Im new to such things. Can someone help me? :)

+4
source share
3 answers

, Opencart. , .

, ..  } . , .

+14

public.

+4

, , , , .

, , "", Magento .

, .

I would also recommend getting a decent IDE that will show you any coding errors like missing brackets, etc., try something like netbeans or eclipse for great warnings when you make simple mistakes.

0
source

Source: https://habr.com/ru/post/1525951/


All Articles