Jump to content

Edit History

matloki

matloki

3 hours ago, joseantgv said:

Please try:


var_dump($module);
if (eval('if (false){    '.$file.' }') !== false)
    require_once( _PS_MODULE_DIR_.$module.'/'.$module.'.php' );
else {
    $errors[] = sprintf(Tools::displayError('%1$s (parse error in %2$s)'), $module, substr($filepath, strlen(_PS_ROOT_DIR_)));
}

 

Replaced:

if (eval('if (false){    '.$file.' }') !== false)
                        require_once( _PS_MODULE_DIR_.$module.'/'.$module.'.php' );
                    else
                        $errors[] = sprintf(Tools::displayError('%1$s (parse error in %2$s)'), $module, substr($filepath, strlen(_PS_ROOT_DIR_)));
                }

With:

var_dump($module);
if (eval('if (false){    '.$file.' }') !== false)
    require_once( _PS_MODULE_DIR_.$module.'/'.$module.'.php' );
else {
    $errors[] = sprintf(Tools::displayError('%1$s (parse error in %2$s)'), $module, substr($filepath, strlen(_PS_ROOT_DIR_)));
}

Hope I've replaced the correct lines. The result is:

Parse error: syntax error, unexpected T_PUBLIC in /web/htdocs/www.xxxx.com/home/prestashop/classes/module/Module.php on line 1255

Then I had trouble when I copied/pasted the replaced on line 1060 "}", this was the message: 

Parse error: syntax error, unexpected '}' in /web/htdocs/www.xxxxx.com/home/prestashop/classes/module/Module.php on line 1060

so I've upload an older module.php now everything is ok excluding the same error when I try to load modules in the BO:

Fatal error: Can't use function return value in write context in /web/htdocs/www.xxxxxxx.com/home/prestashop/classes/module/Module.php(1056) : eval()'d code on line 95 [PrestaShop] Fatal error in module file :/web/htdocs/www.xxxxxx.com/home/prestashop/classes/module/Module.php(1056) : eval()'d code:
Can't use function return value in write context

The code line 95 is: protected static $modules_cache;

I receive this error also when I go to "prices rules" - "marketing" and the same following error when I try to "add a new carrier" into the "shipping" - "carrier" = Fatal error: Can't use function return value in write context in /web/htdocs/www.xxxxxx.com/home/prestashop/classes/module/Module.php(1056) : eval()'d code on line 95

I'd like to understand better prerstashop but my problem seems not so easy. Thanks once again for your help!

 

matloki

matloki

2 hours ago, joseantgv said:

Please try:


var_dump($module);
if (eval('if (false){    '.$file.' }') !== false)
    require_once( _PS_MODULE_DIR_.$module.'/'.$module.'.php' );
else {
    $errors[] = sprintf(Tools::displayError('%1$s (parse error in %2$s)'), $module, substr($filepath, strlen(_PS_ROOT_DIR_)));
}

 

Replaced:

if (eval('if (false){    '.$file.' }') !== false)
                        require_once( _PS_MODULE_DIR_.$module.'/'.$module.'.php' );
                    else
                        $errors[] = sprintf(Tools::displayError('%1$s (parse error in %2$s)'), $module, substr($filepath, strlen(_PS_ROOT_DIR_)));
                }

With:

var_dump($module);
if (eval('if (false){    '.$file.' }') !== false)
    require_once( _PS_MODULE_DIR_.$module.'/'.$module.'.php' );
else {
    $errors[] = sprintf(Tools::displayError('%1$s (parse error in %2$s)'), $module, substr($filepath, strlen(_PS_ROOT_DIR_)));
}

Hope I've replaced the correct lines. The result is:

Parse error: syntax error, unexpected T_PUBLIC in /web/htdocs/www.xxxx.com/home/prestashop/classes/module/Module.php on line 1255

Then I had trouble when I copied/pasted the replaced on line 1060 "}" so I've upload an older module.php now everything is ok excluding the same error when I try to load modules in the BO:

Fatal error: Can't use function return value in write context in /web/htdocs/www.xxxxxxx.com/home/prestashop/classes/module/Module.php(1056) : eval()'d code on line 95 [PrestaShop] Fatal error in module file :/web/htdocs/www.xxxxxx.com/home/prestashop/classes/module/Module.php(1056) : eval()'d code:
Can't use function return value in write context

The code line 95 is: protected static $modules_cache;

I receive this error also when I go to "prices rules" - "marketing" and the same following error when I try to "add a new carrier" into the "shipping" - "carrier" = Fatal error: Can't use function return value in write context in /web/htdocs/www.xxxxxx.com/home/prestashop/classes/module/Module.php(1056) : eval()'d code on line 95

I'd like to understand better prerstashop but my problem seems not so easy. Thanks once again for your help!

 

×
×
  • Create New...