Trouble with registerCpRoutes()
I believe this is caused by not including array in the function parameter, preceding the variable.

Changing to public function actionEdit (array $variables = [ ]) should do the trick.

As a bonus - can anyone explain why? Seems like the $variables variable needs to be cast as an array?