API routes generate invalid development output

Status
This content is read-only, or is not open for further replies.

DragonByte Tech

Guest
offline
Defining the following two routes:

#1
1641315947134.webp

#2
1641315973396.webp

Will both write to api_dbtech-ecommerce_categories_.json.

Suggested solution:
In /src/XF/DevelopmentOutput/Route.php find:
PHP:

$subNameFile = preg_replace('#[^a-z0-9_-]#i', '-', $subName);

Replace with:
Code:

Code:
        $subNameFile = preg_replace('#/$#i', '_', $subName);
        $subNameFile = preg_replace('#[^a-z0-9_-]#i', '-', $subNameFile);

This will cause #1 to...

Read more

Continue reading...
 
Liked by:
Status
This content is read-only, or is not open for further replies.
Top Bottom