wp-config-transformer
wp-config-transformer copied to clipboard
preg_match_all fails with concatenated string
Bug Report
- [ x] Yes, I reviewed the contribution guidelines.
- [ x] Yes, more specifically, I reviewed the guidelines on how to write clear bug reports.
A string in wp-config.php like this:
define( 'WP_HOME', 'https://'.$_SERVER['HTTP_HOST'] );
Is not properly match in parse_wp_config() and ends up swallowing additional line(s).
The quick fix (for me) was to change to:
define( 'WP_HOME', "https://{$_SERVER['HTTP_HOST']}" );
But that doesn't change things in the wild.
You can see this by pasting the line in the regex101 before the /* That's all, stop editing! Happy blogging. */
line.