Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
router.php error
  • hi Harro,
    what is controller_path in router.php?
    i have users module and module have users file in controller
    i get "Undefined variable: key" error when use module like this : localhost/dashboard/users


  • HarroHarro
    Accepted Answer
    controller_path are the URI segments before the controller. With this URI,

       /path1/path2/controller/action/parm1/parm2

    controller_path would be "path1/path2".

    The error was caused because your URI doesn't have any segments at all, which causes the foreach loop to be skipped, and $key not be set.

    Just pushed a fix.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion