MDL-78937 lib: Set default value to $component property

We encountered errors on the plugin check page while upgrading from version 3.11 to 4.3.
The plugins marked with the status "To be deleted" have a null value for the $component property,
which results in the following error message:
"Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is
deprecated in lib/classes/component.php on line 1056."
To avoid this error, we need to set an empty string as the default value for the $component property.
This commit is contained in:
Meirza
2023-09-27 09:53:47 +07:00
parent 83b4c96cad
commit d561e151e5
+1 -1
View File
@@ -84,7 +84,7 @@ abstract class base {
public $incompatible;
/** @var string Name of the plugin */
public $component;
public $component = '';
/**
* Whether this plugintype supports its plugins being disabled.