File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -323,8 +323,9 @@ somewhat like this::
323
323
* If your mapping is complicated, you may want to write unit tests
324
324
* to verify your logic, hence this is public static.
325
325
*/
326
- public static function getLegacyScript(string $requestPathInfo ): string
326
+ public static function getLegacyScript(Request $request ): string
327
327
{
328
+ $requestPathInfo = $request->getPathInfo();
328
329
$legacyRoot = __DIR__ . '/../';
329
330
330
331
// Map a route to a legacy script:
@@ -345,11 +346,11 @@ somewhat like this::
345
346
346
347
public static function handleRequest(Request $request, Response $response, string $publicDirectory): ?string
347
348
{
348
- $p = $request->getPathInfo();
349
- $legacyScriptFilename = LegacyBridge::getLegacyScript($p);
349
+ $legacyScriptFilename = LegacyBridge::getLegacyScript($request);
350
350
351
351
// Possibly (re-)set some env vars (e.g. to handle forms
352
352
// posting to PHP_SELF):
353
+ $p = $request->getPathInfo();
353
354
$_SERVER['PHP_SELF'] = $p;
354
355
$_SERVER['SCRIPT_NAME'] = $p;
355
356
$_SERVER['SCRIPT_FILENAME'] = $legacyScriptFilename;
You can’t perform that action at this time.
0 commit comments