Open bestdamnfriend opened 8 years ago
Thanks for the commit, I'll test this soon!
btw the normal way to do this: simply dont use the default method for actions with parameters :)
Hello @panique thanks for your amazing contribution!! I have one question about the URL:
Is it a way to use the first way and invoke the home controller with the about action??
Thanks in advance!
@bdiazc90 hi, thanks back! :) does a home controller and an about method exist ? if so, then your apache/nginx settings might be broken, or the installation itself has a problem. I can only recommend to use the autoinstaller and then try to reproduce the error, if you cannot reproduce then it might be your settings... Can you post more details on your problem ?
Hi @panique! Thanks for your answer, I had been looking for solving my problem in the code. I did it! I just copy all the MINI package to my localhost and update with my project. This is a great (semi) framework, I love it!
Very cool! :) Glad it fixed your problem
Analysing
application.php
, I see a lot of nestedif
statements, which causes the URL parameters to only be passed tocall_user_func_array()
if the selected controller and method are found, and not if the defaults are used. For example:localhost/mini/home/index/4
sends the parameter4
localhost/mini/home/4
throws an errorlocalhost/mini/4
throws an errorYou'd be better off checking each part of the URL individually, reverting to defaults if need be. Then,
call_user_func_array
will always run. This is my rewrittenapplication.php
: