Please change

```
$extra_parameters = array_slice($params,count($keys));
```

to

```
$extra_parameters = array_slice($params, count($keys));
```