No Code Attached Yet
avatar Stuartemk
Stuartemk
12 May 2022

Steps to reproduce the issue

Expected result

Actual result

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

System information (as much as possible)

Additional comments

	-$data = trim($data);
	+$data = trim((string) $data);
avatar Stuartemk Stuartemk - open - 12 May 2022
avatar joomla-cms-bot joomla-cms-bot - change - 12 May 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 12 May 2022
avatar ReLater
ReLater - comment - 12 May 2022

That's a vendor library and your issue should go here: https://github.com/joomla-framework/registry/tree/2.0-dev/src/Format

avatar laoneo
laoneo - comment - 26 May 2022
avatar nibra
nibra - comment - 19 Jun 2022

@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.

avatar brianteeman
brianteeman - comment - 15 Aug 2022

I guess this should be closed as it is being addressed in the framework repo ?

avatar joomdonation joomdonation - change - 13 Nov 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-11-13 10:37:26
Closed_By joomdonation
avatar joomdonation joomdonation - close - 13 Nov 2022
avatar joomdonation
joomdonation - comment - 13 Nov 2022

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.

Add a Comment

Login with GitHub to post a comment