Catchable fatal error: Argument 1 passed to WPCOTool\Plugin::__construct() must be an instance of WPCOTool\string, string given, called in .../contributor-orientation-tool/contributor-orientation-tool.php on line 32 and defined in .../contributor-orientation-tool/src/WPCOTool/Plugin.php on line 74
The error stems from use of the string scalar type declaration in class constructors, support for which was added in PHP 7.0.
I came across this issue after switching PHP versions to test a PHP-version-specific WordPress core patch.
PHP Support
I understand that the plugin is marked as requiring a minimum of PHP 7.0, however, the source of this fatal error may not be apparent to some users. Preventing the occurrence of the resultant white screen of death would be a preferable alternative 😂 ...at least until PHP 5.6 support is officially dropped.
Issue
The following fatal error occurs when the activated plugin's environment is switched to PHP 5.6, which as of this writing is still supported by WordPress.
The error stems from use of the
string
scalar type declaration in class constructors, support for which was added in PHP 7.0.I came across this issue after switching PHP versions to test a PHP-version-specific WordPress core patch.
PHP Support
I understand that the plugin is marked as requiring a minimum of PHP 7.0, however, the source of this fatal error may not be apparent to some users. Preventing the occurrence of the resultant white screen of death would be a preferable alternative 😂 ...at least until PHP 5.6 support is officially dropped.