When installing v2.3.0.2, if the path contains a single quote this is not escaped when writing the config.php files, resulting in a php error when trying to load the site.
I have confirmed that this is still an issue in the current master.
Can you tell wath is the error?
For v2.3.0.2
Parse error: syntax error, unexpected 's' (T_STRING), expecting ',' or ')' in C:\inetpub\KAL's\opencart\upload\config.php on line 9
Line 9 is this:
define('DIR_APPLICATION', 'C:/inetpub/KAL's/opencart/upload/catalog/');
And should be:
define('DIR_APPLICATION', 'C:/inetpub/KAL\'s/opencart/upload/catalog/');
v2.3.0.2 is affected on lines 9-19 of the config file, 11-22 of the admin config file.
The current master is affected on lines 8-10 of the config file, 11-14 of the admin config file.
The issue is the same on each effected line.
You are right, But who use an apostrophe in the install path for god sake. I would keep just as is, as a way for identify bad paths names, because this probably will cause other kinds of errors.
This is one more
admin/controller/common/filemanager.php
Search - line 39
if (substr(str_replace('\\', '/', realpath($directory . '/' . $filter_name)), 0, strlen(DIR_IMAGE . 'catalog')) == DIR_IMAGE . 'catalog') {
Replace
if (substr(str_replace('\\', '/', realpath($directory . '/')), 0, strlen(DIR_IMAGE . 'catalog')) == DIR_IMAGE . 'catalog') {
Search - line 80 and 88
implode(' ', $name)
Replace
implode('', $name) // remove withe space between ''
Most helpful comment
You are right, But who use an apostrophe in the install path for god sake. I would keep just as is, as a way for identify bad paths names, because this probably will cause other kinds of errors.