-
-
Notifications
You must be signed in to change notification settings - Fork 452
PHP8.5: fix null array offset #5028
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
base: main
Are you sure you want to change the base?
Changes from all commits
23380db
df2035a
c9e76ae
87cce81
7dcbd65
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 | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -110,6 +110,10 @@ public function matchEvent(Mage_Index_Model_Event $event) | |||||||||||||||||||||||
| */ | ||||||||||||||||||||||||
| public function matchEntityAndType($entity, $type) | ||||||||||||||||||||||||
| { | ||||||||||||||||||||||||
| if ($entity === null) { | ||||||||||||||||||||||||
| $entity = ''; | ||||||||||||||||||||||||
|
Comment on lines
110
to
+114
|
||||||||||||||||||||||||
| */ | |
| public function matchEntityAndType($entity, $type) | |
| { | |
| if ($entity === null) { | |
| $entity = ''; | |
| * @throws InvalidArgumentException if $entity is null | |
| */ | |
| public function matchEntityAndType(?string $entity, string $type) | |
| { | |
| if ($entity === null) { | |
| throw new InvalidArgumentException('Entity name must not be null.'); |
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.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -738,6 +738,11 @@ protected function _toOptionHash($valueField = 'id', $labelField = 'name') | |||||
| public function getItemById($idValue) | ||||||
| { | ||||||
| $this->load(); | ||||||
|
|
||||||
| if ($idValue === null) { | ||||||
| $idValue = ''; | ||||||
|
||||||
| $idValue = ''; | |
| return null; |
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.
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.
Why not like this?
$productTypeId ??= '';