Deprecated
: trim(): Passing null to parameter #1 ($string) of type string is deprecated in
/public_html/libraries/vendor/joomla/registry/src/Format/Json.php
on line
54
-$data = trim($data);
+$data = trim((string) $data);
Labels |
Added:
No Code Attached Yet
|
Check joomla-framework/registry#61.
@Stuartemk Strictly speaking, it is an error that the method ever accepted a null value. The documentation (DocBlock) clearly states that it must be a string. The next release of the registry in the framework will contain a corresponding check.
I guess this should be closed as it is being addressed in the framework repo ?
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-11-13 10:37:26 |
Closed_By | ⇒ | joomdonation |
Yes. General issue like this need to be addressed in framework repo. If you still see this warnings while using Joomla, please submit a separate issue telling us how to see the issue ourself so that we can fix the code in CMS which calls this method (We usually fix it by changing the code passed to the method to something like $data ?? ''
)
For now, I'm closing this issue as there is nothing we can discuss/work further on it here.
That's a vendor library and your issue should go here: https://github.com/joomla-framework/registry/tree/2.0-dev/src/Format