I got the same problem on my Windows development machine after downloading the code from my linux server. Also after enabling permalinks (although this could be a coincidence).
The problem is caused when values in the $match variable around the lines 210 and 211 in classes.php begin with a question mark. As the ? is not escaped, the preg_match function expects the ? to relate to the previous character, which doesn’t exist.
I’ve not analysed it too much because it’s just my development machine that goes wrong, but I solved it in dev by adding this line of code above the foreach statement on line 210
$match = str_replace(‘?’, ‘\?’, $match);
I believe this is what the $match variable should hold in anycase – escaped question marks where they are part of the URL being searched for. For example one of the $match values is
And that question mark at the beginning is causing the problem.
- The topic ‘Error After Setting Permalinks’ is closed to new replies.