T
T
The Dragger2015-04-06 14:32:42
Yii
The Dragger, 2015-04-06 14:32:42

Why bad request error 400?

Here's the code that always worked, but now it doesn't.

public function actionDelete($id) {
        $this->loadModel($id)->delete();

        // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser
        if (!isset($_GET['ajax']))
            $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('index'));
    }

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Grechushnikov, 2015-04-06
@IPD2

Are you passing $id in the link?
if yii2 then check verb

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question