前端的OctoberCMS错误 - 前端无法访问触发错误“具有类类型提示的参数的默认值只能为NULL”

all I am new to OctoberCMS, i have installed already built project into my Ubuntu 16.04 system with PHP5.6 and apache2. I have successfully setup and run project backend after very hard trying. but problem is when i open any front-end URL then this error occurs:

Default value for parameters with a class type hint can only be NULL
/home/vasim/jannat/code/octoberdev2/plugins/look/casefiles/classes/ActivityLogger.php line 59

error screenshot

I have search it on Google and can not finding anything helpful and i have also find out that it is a rainlab plug-in error, I have uninstall and reinstall that plug-in but that also not worked. so, please can anyone help me with this error?

Any help will be appreciated.

It seems an error from a plugin called look/casefiles. If it's not your own plugin try to remove it and the application should works well.

The most likely root cause of this is that the plugin was written in PHP 7.x, using typehint bool in the method signature. PHP5.6 doesn't support booltypehint and interprets bool typehint as class and thus the error.

You have some choices:

  • Upgrade your project to PHP 7
  • See if the plugin is available in PHP 5.x compatible version and use that instead
  • Remove the plugin altogether and find another with equivalent functionality
  • Remove the plugin and code equivalent functionality yourself
  • Fix the error in the plugin yourself (making it backward compatible) Heads up! It might break when you upgrade the plugin.