The problem is on Nextgen plugin. File name is and path is nextgen-gallery/products/photocrati_nextgen/modules/router
Problematic line is
$param_regex = "#/((?P<id>{$id}){$param_sep})?({$param_prefix}[-_]?)?{$quoted_key}{$param_sep}(?P<value>[^/\?]+)/?#i";
This $param_regex pattern-string part looks just so wrong there – never must be used direct injection of variables into regexp pattern. There must be used preg-quote() .
@see https://php.net/manual/en/function.preg-quote.php
===================
Before it was (Line no 484)
if (preg_match($param_regex, $source, $matches)) {
I did this
if (@preg_match($param_regex, $source, $matches)) {
Hopefully @devs will not put that as a “fix” – this is just ignoring errors in regexp pattern.
My solution was to revert back to ver 1.9.x. Latest ver messed up WP’s routings.