-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[4.1] PHP 8.1 deprecation notices libraries/src #36355
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
253544f
PHP 8.1 deprecation notices libraries/src
frostmakk 821fd80
Update ComponentlayoutField.php
frostmakk ef22f70
coding standard
frostmakk 675417f
Adding ../Table/Module.php
frostmakk b5d53be
Adding 6 more.
frostmakk 60032fc
Update PunycodeHelper.php
frostmakk d9d6793
Empty line
frostmakk 264f3a6
Merge branch 'joomla:4.0-dev' into php81-lib
frostmakk 91ca188
Update libraries/src/String/PunycodeHelper.php
frostmakk 2ee79a5
Update libraries/src/Filter/OutputFilter.php
frostmakk 5781220
Update libraries/src/Filesystem/Path.php
frostmakk bc34ce7
Update libraries/src/Date/Date.php
frostmakk e7db474
Requested changes
frostmakk d171d08
Merge branch 'php81-lib' of https://github.com/frostmakk/joomla-cms i…
frostmakk 15a6683
Moved comment
frostmakk 311e83a
Cleanup
wilsonge 5bc13a1
Merge branch '4.0-dev' into php81-lib
zero-24 0379f58
Review updates
frostmakk 556652e
Merge branch '4.0-dev' into php81-lib
zero-24 9c8c0fb
Merge branch 'joomla:4.0-dev' into php81-lib
frostmakk e833f4f
CleanUp some merged parts
frostmakk 3f727c6
More cleanup
frostmakk 199e362
Merge branch 'joomla:4.0-dev' into php81-lib
frostmakk afa1754
Merge branch 'joomla:4.0-dev' into php81-lib
frostmakk 77d1cd1
Revert Path.php
frostmakk 4eae9a8
Revert Date.php
frostmakk f15ac88
Merge branch '4.1-dev' into php81-lib
412fb02
Merge branch '4.1-dev' into php81-lib
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -157,7 +157,7 @@ public function check() | |
| } | ||
|
|
||
| // Prevent to save too large content > 65535 | ||
| if ((\strlen($this->content) > 65535) || (\strlen($this->params) > 65535)) | ||
| if ((\strlen($this->content ?? '') > 65535) || (\strlen($this->params) > 65535)) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As we're checking for "too large" we can add the check in front? |
||
| { | ||
| $this->setError(Text::_('COM_MODULES_FIELD_CONTENT_TOO_LARGE')); | ||
|
|
||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is probably a bad fix - there shouldn't ever be null being passed to this function - if there is - then we should fix it to not be called first
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This notice pop up in several places.
Here is a Stack trace from creating a new Random Image module:
PHP Deprecated: strtoupper(): Passing null to parameter #1 ($string) of type string is deprecated in ..\libraries\src\Language\Language.php on line 1183
PHP Stack trace:
PHP 1. {main}() ..\administrator\index.php:0
PHP 2. require_once() ..\administrator\index.php:32
PHP 3. Joomla\CMS\Application\CMSApplication->execute() ..\administrator\includes\app.php:63
PHP 4. Joomla\CMS\Application\AdministratorApplication->doExecute() ..\libraries\src\Application\CMSApplication.php:278
PHP 5. Joomla\CMS\Application\AdministratorApplication->dispatch($component = uninitialized) ..\libraries\src\Application\AdministratorApplication.php:186
PHP 6. Joomla\CMS\Component\ComponentHelper::renderComponent($option = 'com_modules', $params = uninitialized) ..\libraries\src\Application\AdministratorApplication.php:143
PHP 7. Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch() ..\libraries\src\Component\ComponentHelper.php:389
PHP 8. Joomla\CMS\MVC\Controller\BaseController->execute($task = 'display') ..\libraries\src\Dispatcher\ComponentDispatcher.php:146
PHP 9. Joomla\Component\Modules\Administrator\Controller\DisplayController->display($cachable = uninitialized, $urlparams = uninitialized) ..\libraries\src\MVC\Controller\BaseController.php:730
PHP 10. Joomla\CMS\MVC\Controller\BaseController->display($cachable = uninitialized, $urlparams = uninitialized) ..\administrator\components\com_modules\src\Controller\DisplayController.php:122
PHP 11. Joomla\Component\Modules\Administrator\View\Module\HtmlView->display($tpl = uninitialized) ..\libraries\src\MVC\Controller\BaseController.php:692
PHP 12. Joomla\Component\Modules\Administrator\View\Module\HtmlView->addToolbar() ..\administrator\components\com_modules\src\View\Module\HtmlView.php:78
PHP 13. Joomla\CMS\Language\Language->hasKey($string = NULL) ..\administrator\components\com_modules\src\View\Module\HtmlView.php:156
PHP 14. strtoupper($string = NULL) ..\libraries\src\Language\Language.php:1183
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, probably "early return" when it's empty?