littlebizzy / slickstack

Lightning-fast WordPress on Nginx
https://slickstack.io
GNU General Public License v3.0
629 stars 112 forks source link

PHP Warning: Use of undefined constant false_SUBDOMAINS #67

Closed Bronislawsky closed 3 years ago

Bronislawsky commented 3 years ago

define('MULTISITE', @WP_MULTISITE); // ss = false
define('SUBDOMAIN_INSTALL', @WP_MULTISITE_SUBDOMAINS); // ss = true

@WP_MULTISITE get parsed before
define('SUBDOMAIN_INSTALL', @WP_MULTISITE_SUBDOMAINS); // ss = true
so it results in a

PHP Warning: Use of undefined constant false_SUBDOMAINS - assumed 'false_SUBDOMAINS' (this will throw an Error in a future version of PHP) in /var/www/html/wp-config.php on line 72
jessuppi commented 3 years ago

Thanks for your report @Bronislawsky

This was caused by conflicting sed replacement strings in our ss-install-wordpress-config script, and it has now been fixed by changing the order in which the variable placeholders are "replaced"...

Ref: https://github.com/littlebizzy/slickstack/commit/f946d3ed01280f930daae3a3482d5ed4b537e791

However this should probably be made more robust in the future by using more unique placeholder names!

E.g. replacing @WP_MULTISITE negatively effects @WP_MULTISITE_SUBDOMAINS strings...