I have a custom class Controller extended from CController and I get the same error, after a while I notice my mistake,
I called beforeAction() without the parameter $action, in php5.5.x I don’t get any error but in php7 I get a fatal error like you, so I write the method as it should be beforeAction($action) and it seems is working now.