-
-
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
Changes from 24 commits
253544f
821fd80
ef22f70
675417f
b5d53be
60032fc
d9d6793
264f3a6
91ca188
2ee79a5
5781220
bc34ce7
e7db474
d171d08
15a6683
311e83a
5bc13a1
0379f58
556652e
9c8c0fb
e833f4f
3f727c6
199e362
afa1754
77d1cd1
4eae9a8
f15ac88
412fb02
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1180,7 +1180,7 @@ public function getUsed() | |
| */ | ||
| public function hasKey($string) | ||
| { | ||
| $key = strtoupper($string); | ||
| $key = strtoupper($string ?? ''); | ||
|
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. 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
Contributor
Author
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. This notice pop up in several places. PHP Deprecated: strtoupper(): Passing null to parameter #1 ($string) of type string is deprecated in ..\libraries\src\Language\Language.php on line 1183
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. Agree, probably "early return" when it's empty? |
||
|
|
||
| return isset($this->strings[$key]); | ||
| } | ||
|
|
||
| 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')); | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.