Skip to content

Commit

Permalink
Merge pull request trongate#163 from DaFa66/Core-fix
Browse files Browse the repository at this point in the history
Fix handling of '0' in segment 3 to prevent empty string assignment
  • Loading branch information
trongate authored Jan 23, 2024
2 parents af67707 + cd958c3 commit 6c8e682
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions engine/Core.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,7 @@ private function serve_controller(): void {
}
}

if (isset($segments[3])) {
$no_query_params = explode('?', $segments[3])[0];
$this->current_value = !empty($no_query_params) ? $no_query_params : $this->current_value;
}
$this->current_value = isset($segments[3]) ? $segments[3] : $this->current_value;

$controller_path = '../modules/' . $this->current_module . '/controllers/' . $this->current_controller . '.php';

Expand Down

0 comments on commit 6c8e682

Please sign in to comment.