S
S
Sergey Beloventsev2018-09-03 16:53:46
Yii
Sergey Beloventsev, 2018-09-03 16:53:46

I do not understand what is wrong with the accepted argument?

Here is the action

class ForSpecialistsController extends Controller
{
     public function actionIndex($token)
    {
        try{...}
    }
}

here is the actual url
tiger.lc/ru/auth/for-specialists/index/?token=wXPV...
I get this error
Too few arguments to function frontend\controllers\auth\ForSpecialistsController::actionIndex(), 0 passed and exactly 1 expected

why?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny Bukharev, 2018-09-03
@evgenybuckharev

You need to write a rule in the url manager for this url, actionIndex expects $token and ?token=wXPV... does not fall into this variable

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question