Skip to content

Use REQUEST_URI as fallback#3

Open
shoorick wants to merge 1 commit intoliorphp:masterfrom
shoorick:url
Open

Use REQUEST_URI as fallback#3
shoorick wants to merge 1 commit intoliorphp:masterfrom
shoorick:url

Conversation

@shoorick
Copy link

There are some strange and inconvenient things in route handling:

  1. Current procedure use $_GET['url'] only. It works with Apache and mod_rewrite but doesn’t work with PHP built-in development server — tested with 7.4 and 8.2 on Debian GNU/Linux 11.
  2. Variable self::$url is useless because it assigned but never used.
  3. Functions for $url and self::$url are different but it’s possible to use common function set.
  4. The else block is unnecessary.

Suggested code manually tested with PHP built-in development server. I’m going to test it with Apache too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant