open a component's settings at admin backend
got notice;
Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated
in ..\administrator\components\com_fields\src\Helper\FieldsHelper.php on line 59
I changed code at line 59 to:
if (empty($contextString))
$parts = array();
else
$parts = explode('.', $contextString, 2);
this fixed it.
4.3-apha4-dev
php 8.1.6
Labels |
Added:
No Code Attached Yet
|
Labels |
Added:
PHP 8.x
|
hi,
I am not able to find out which component is causing this. But I think that any coding esp. in libraries should take care, if parameters or any other input is not set as expected- E.g. if your variable "$contextString" is expected to be an array you should check this and add code to handle wrong assignments.
Yes, we can take care of that, but it will make our codebase a bit ugly. Since you proposed code, could you please make a PR to address this issue ? I think we can just return early if null is passed for that parameter, something like:
if ($contextString === null) {
return null;
}
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2023-02-15 11:30:58 |
Closed_By | ⇒ | joomdonation |
@jschmi102 Could you please let us know what component you are having this error :