Closed (fixed)
Project:
Views Aggregator Plus
Version:
2.1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
22 Aug 2023 at 21:21 UTC
Updated:
26 Oct 2024 at 06:14 UTC
Jump to comment: Most recent
Comments
Comment #5
tr commentedIt's a PHP 8.1 thing, so you have to test against PHP 8.1. I triggered a test for you.
The parameter is commented wrong in your patch it should be:
@var arrayIt would also be nice to have a test case that uses this code, so that the tests would show the error. The reasons this hasn't been seen before is because it's in that special case commerce code which isn't tested.
Comment #6
tr commentedAlso, since you're using the commerce integration, perhaps you can test #3376200: No aggregation total shown if first result is empty (commerce_price fields) ?
Comment #7
tr commentedComment #8
anybodyThanks @TR, just tried, but sadly this is not fixed by #3376200: No aggregation total shown if first result is empty (commerce_price fields)
Comment #9
anybodyFor details see https://www.php.net/manual/en/migration82.deprecated.php
Eventually it needs
if this is required by design.
Comment #10
tr commentedPersonally I think when there's module-specific exceptions like this being made in the code, it's a giant red flag indicating that something is being done wrong.
Why should some commerce field be treated differently than any other Drupal field? How many modules do we have to make exceptions for?
Either Views Aggregator isn't doing the right thing, or the commerce module isn't constructing their field properly.
Yes, your MR would be the right way to fix things if we want to keep that variable around, but I personally would rather see this module fixed so it doesn't have to make exceptions like that. However I don't personally have the time or desire to set up a commerce site so I can investigate and figure out a proper solution.
Comment #11
anybody@tr: Agreed! :)
Comment #12
tr commentedYeah, I'm not going to do any of those things I said in #10. I'm just going to add property, add a @todo, and open a new issue to examine the issue of potentially removing commerce-specific code.
Comment #18
tr commentedComment #20
tr commentedCommitted.