Skip to content

Commit

Permalink
fix: Update regex to match whole line only
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume1868 committed Oct 8, 2024
1 parent b0fd00c commit 2168b14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion public/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

function getRedirection($redirect_uri)
{
if (preg_match('/^\/exercises\/([0-9]+)\?exercise%5Bstatus%5D=(answering|closed)$/', $_SERVER['REQUEST_URI'], $output_array)) {
if (preg_match('/^\/exercises\/([0-9]+)\?exercise%5Bstatus%5D=(answering|closed)$/A', $_SERVER['REQUEST_URI'], $output_array)) {
if ($output_array[2] == 'answering') {
setExerciseAsAnswering($output_array[1]);
} elseif ($output_array[2] == 'closed') {
Expand Down

0 comments on commit 2168b14

Please sign in to comment.