No Code Attached Yet
avatar brianteeman
brianteeman
9 Aug 2022

Steps to reproduce the issue

Install Joomla 4.,2rc and the sample data
php version is 8.1.7
navigate front end of the site

Expected result

empty php error log

Actual result

[09-Aug-2022 09:18:30 UTC] PHP Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in libraries\src\Document\OpensearchDocument.php on line 139

avatar brianteeman brianteeman - open - 9 Aug 2022
avatar joomla-cms-bot joomla-cms-bot - change - 9 Aug 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 9 Aug 2022
avatar richard67
richard67 - comment - 9 Aug 2022

the sample data

@brianteeman Which one? Blog? Or multilingual? Or testing?

avatar brianteeman
brianteeman - comment - 9 Aug 2022

It was blog - but I doubt it makes a difference

avatar Fedik
Fedik - comment - 9 Aug 2022

It is here

$elDescription = $xml->createElementNS($osns, 'Description');
$elDescription->appendChild($xml->createTextNode(htmlspecialchars($this->description)));
$elOs->appendChild($elDescription);

However default value is empty string (not null)

/**
* Document description
*
* @var string
* @since 1.7.0
*/
public $description = '';

It seems that some code overrides the default value value to null

avatar Fedik
Fedik - comment - 10 Aug 2022

Please test #38431

avatar Fedik Fedik - change - 10 Aug 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-08-10 09:13:49
Closed_By Fedik
avatar Fedik Fedik - close - 10 Aug 2022

Add a Comment

Login with GitHub to post a comment