mirror of
https://github.com/standardebooks/web.git
synced 2025-07-17 20:06:39 -04:00
Update PHPStan and Safe PHP, and review codebase for further type correctness
This commit is contained in:
parent
e2e14a3551
commit
9d1b66d19e
35 changed files with 301 additions and 169 deletions
|
@ -80,7 +80,9 @@ try{
|
|||
ksort($queryStringParams);
|
||||
|
||||
// If all we did was select one tag, redirect the user to `/subjects/<TAG>` instead of `/ebooks?tag[0]=<TAG>`.
|
||||
if(sizeof($tags) == 1 && $query == '' && preg_match('|^/ebooks|iu', $_SERVER['REQUEST_URI'] ?? '')){
|
||||
/** @var string $requestUri */
|
||||
$requestUri = $_SERVER['REQUEST_URI'] ?? '';
|
||||
if(sizeof($tags) == 1 && $query == '' && preg_match('|^/ebooks|iu', $requestUri)){
|
||||
unset($queryStringParams['tags']);
|
||||
$queryStringWithoutTags = http_build_query($queryStringParams);
|
||||
$url = '/subjects/' . $tags[0];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue