joomla-extensions / jedchecker

Joomla extension to check components, modules or plugins for possible problems for submission to the JED -> Translations: https://joomla.crowdin.com/joomla-official-extensions
38 stars 28 forks source link

[PHP 8.1] Deprecated: trim(): Passing null to parameter #1 ($string) in rules/xmlinfo.php on line 322 #198

Closed toivo closed 11 months ago

toivo commented 1 year ago

The trim() function reports a Deprecated error if the XML manifest does not have a sub folder 'language' in the language definition. Example from https://extensions.joomla.org/extension/names-online/ - Names Online module:

    <languages>
        <language tag="en-GB">en-GB.mod_namesonline.ini</language>
        <language tag="en-GB">en-GB.mod_namesonline.sys.ini</language>
    </languages>

Error Message

 Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in C:\www\joomla4test\administrator\components\com_jedchecker\libraries\rules\xmlinfo.php on line 322

If the manifest defines a sub folder 'language', the Deprecated error does not occur.

Environment: Joomla 4.2.9-dev of 21 February using PHP 8.1.10.

dryabov commented 1 year ago

Fixed by PR #199

toivo commented 1 year ago

@dryabov thank you, the patch fixed the issue!