类Slim \ Http \ Request的对象无法转换为double

I'm trying to send a friendship request, combining users ids in one table, but seems i have made somewhere a mistake. Here is the fragment of code:

public function sendRequest($user_one_id, $user_two_id, $status, $action_user_id) {
    $stmt = $this->conn->prepare("INSERT INTO relationship(user_one_id, user_two_id, status, action_user_id) VALUES (?, ?, ?, ?)");
    $stmt->bind_param("iiii", $user_one_id, $user_two_id, $status, $action_user_id);
    $result = $stmt->execute(); // HERE IS AN ERROR
    $stmt->close();

    if (!$result) {
        return NULL;
    } else {
        return TRUE;
    }
}

The error i'm getting:

Object of class Slim\Http\Request could not be converted to double

EDIT:

This is how i'm calling method:

$app->post('/send_request', function() use ($app) {

// check for required params
verifyRequiredParams(array('user_one_id', 'user_two_id', 'status', 'action_user_id'));

// reading post params
$user_one_id = $app->request('user_one_id');
$user_two_id = $app->request('user_two_id');
$status = $app->request('status');
$action_user_id = $app->request('action_user_id');
$response = array();

$db = new DbHandler();

$relationship = $db->sendRequest($user_one_id, $user_two_id, $status, $action_user_id);

if ($relationship != NULL) {
    $response["error"] = false;
    $response["request"]["user_one_id"] = $relationship["user_one_id"];
    $response["request"]["user_two_id"] = $relationship["user_two_id"];
    $response["request"]["status"] = $relationship["status"];
    $response["request"]["action_user_id"] = $relationship["action_user_id"];
} else {
    $response["error"] = true;
    $response["message"] = "An error occurred. Please try again later.";
}
echoRespnse(200, $response);
});

What happens in your verifyRequiredParams function? In the code you posted I dont see any conversion of a Slim\Http\Request object.

$user_one_id = $app->request('user_one_id');
$user_two_id = $app->request('user_two_id');
$status = $app->request('status');
$action_user_id = $app->request('action_user_id');

From what I can tell, these are the only lines of code where you do anything with a Slim request object. Can you verify that the values in these variables you are setting are correct? Like var_dump() them and put an exit in your code and see what it says.