Skip to content
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

Several php8 errors #2425

Closed
a-v-l opened this issue Feb 28, 2023 · 5 comments
Closed

Several php8 errors #2425

a-v-l opened this issue Feb 28, 2023 · 5 comments
Labels
Milestone

Comments

@a-v-l
Copy link
Contributor

a-v-l commented Feb 28, 2023

Isotope 2.8.10, Contao 4.13.15, PHP 8.1

Uncaught PHP Exception ErrorException: "Warning: Undefined array key "group"" at vendor/isotope/isotope-core/system/modules/isotope/library/Isotope/Model/Attribute/AbstractAttributeWithOptions.php line 98

if ($option['group']) {

fixed with:

if ($option['group'] ?? false) {

leads to:
Uncaught PHP Exception ErrorException: "Warning: Undefined array key "group"" at vendor/isotope/isotope-core/system/modules/isotope/library/Isotope/Model/Product/Standard.php line 711

} elseif (!\in_array($option['value'], $arrOptions) && !$option['group']) {

fixed with:

} elseif (!\in_array($option['value'], $arrOptions) && !($option['group'] ?? false)) {
@a-v-l
Copy link
Contributor Author

a-v-l commented Feb 28, 2023

a-v-l@7206dec

@a-v-l a-v-l changed the title Warning: Undefined array key "group" Several php8 errors Feb 28, 2023
@a-v-l
Copy link
Contributor Author

a-v-l commented Feb 28, 2023

Uncaught PHP Exception ErrorException: "Warning: Trying to access array offset on value of type null" at vendor/isotope/isotope-core/system/modules/isotope_rules/library/Isotope/Rules.php line 261 (and 266)

Fixed in: a-v-l@f0e565f

@a-v-l
Copy link
Contributor Author

a-v-l commented Feb 28, 2023

Uncaught PHP Exception ErrorException: "Warning: Attempt to read property "id" on null" at vendor/isotope/isotope-core/system/modules/isotope/library/Isotope/CheckoutStep/Address.php line 327

Fixed in: a-v-l@c52adb8

@a-v-l
Copy link
Contributor Author

a-v-l commented Feb 28, 2023

And putting products in the cart leads to several errors:

Uncaught PHP Exception ErrorException: "Warning: Undefined array key "membersOnly"" at vendor/isotope/isotope-core/system/modules/isotope/library/Isotope/Module/CartAddress.php line 110

Uncaught PHP Exception ErrorException: "Warning: Undefined array key "addressDetails"" at vendor/isotope/isotope-core/system/modules/isotope/library/Isotope/Module/CartAddress.php line 187

Uncaught PHP Exception ErrorException: "Warning: Undefined array key "tl_member"" at vendor/isotope/isotope-core/system/modules/isotope/library/Isotope/Module/CartAddress.php line 187

@aschempp
Copy link
Member

aschempp commented Mar 2, 2023

thanks! closing this in favor of #2426

@aschempp aschempp closed this as completed Mar 2, 2023
@aschempp aschempp added the bug label Mar 2, 2023
@aschempp aschempp added this to the 2.8.11 milestone Mar 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants