Shouldn't you do first the check:
```php
if (!isset($input['command']))) {
   // Your patch here
}
```
To avoid unnecessary calls?