No Code Attached Yet
avatar ghazal
ghazal
4 Jan 2022

PHP 8.1
While testing a component of mine against PHP 8.1 and J4, I got this Deprecation Notices that seemed relevant even outside the scope of my own devt:

Deprecated: ucfirst(): Passing null to parameter #1 ($string) of type string is deprecated in /libraries/src/MVC/Controller/BaseController.php on line 318

Deprecated: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in /libraries/src/MVC/Controller/BaseController.php on line 713

My suggestions:

line 318
$class = ucfirst((string) $prefix) . 'Controller' . ucfirst((string) $type);

line 712
$task = strtolower((string) $task);
avatar ghazal ghazal - open - 4 Jan 2022
avatar ghazal ghazal - change - 4 Jan 2022
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 4 Jan 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 4 Jan 2022
avatar PhilETaylor
PhilETaylor - comment - 4 Jan 2022

fixed in PR #36355 - please test that PR and mark your test result using issues.joomla.org to give that PR a hope of being merged.

https://github.com/joomla/joomla-cms/pull/36355/files#diff-77d64b4a20cf3aa5cba06d0632d795643cee616e7290fd25a03759aaf4b989df

Please close this issue as already addressed.

avatar alikon alikon - change - 4 Jan 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-01-04 16:39:08
Closed_By alikon
avatar alikon alikon - close - 4 Jan 2022
avatar ghazal
ghazal - comment - 5 Jan 2022

Yes. I will.
But honestly, it's kind of a drag to find what's been merged or still in PR among all the issues concerning Deprecation Notices re PHP 8.1.

avatar PhilETaylor
PhilETaylor - comment - 5 Jan 2022

well the only way to improve that is to test all these PR's - the sooner they are tested, the sooner they can be merged.

Add a Comment

Login with GitHub to post a comment