Skip to content

Commit

Permalink
MDL-78937 lib: Set default value to $component property
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
meirzamoodle committed Sep 27, 2023
1 parent 83b4c96 commit d561e15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/classes/plugininfo/base.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit d561e15

Please sign in to comment.