1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Not a Bug XenForo_Router::resolveActionWithStringParam removes slashes from route path...

Discussion in 'Resolved Bug Reports' started by Mr. Goodie2Shoes, Sep 5, 2014.

  1. Mr. Goodie2Shoes

    Mr. Goodie2Shoes Well-Known Member

    This isn't a bug or anything, and may work without any issue but this messes up one of my add-on's routing. I think it wont hurt to add '/' during imploding the components together. :)
     
    Last edited: Sep 6, 2014
  2. Chris D

    Chris D XenForo Developer Staff Member

  3. Mr. Goodie2Shoes

    Mr. Goodie2Shoes Well-Known Member

    I created a system that allows adding multiple data inside a route path.

    For example: "admin.php?add-ons/{$addon_id}/versions/{$version_id}/edit"

    So when the reouter fetches the addon_id from the path the action that is returned is "versions{$version_id}edit" and the next routing phase fails. But adding '/' in the implode function fixes the issue.

    I do know this is how it was designed. :)
     
  4. Mike

    Mike XenForo Developer Staff Member

    As you've noted a couple times, this is as designed. The return value is an action so it can be any value that could be manipulated to be an action (which comes down to A-Z 0-9 _ mostly). Anything outside that range shouldn't be relied upon.
     

Share This Page