advagg_bundler_analysis() wrongly passes '>' to max()

Created on 11 April 2022, about 2 years ago
Updated 14 July 2023, 12 months ago

advagg_bundler_analysis() uses the following code.

    // See if we have a cached version of this. Generate cache ID.
    $query = db_select('advagg_aggregates_versions', 'aav')
      ->condition('aav.root', 1)
      ->condition('aav.atime', REQUEST_TIME - max(172800, variable_get('advagg_bundler_outdated', ADVAGG_BUNDLER_OUTDATED), '>'), '>');

It passes '>' to max(), which causes max() to return '>' in PHP 8. PHP 7 would ignore the last value passed to max(), but the code is still wrong, as it is calculating the maximum value between 172800 and variable_get('advagg_bundler_outdated', ADVAGG_BUNDLER_OUTDATED).

πŸ› Bug report
Status

Closed: duplicate

Version

2.0

Component

Code

Created by

πŸ‡§πŸ‡ΎBelarus alena_stanul

Live updates comments and jobs are added and updated live.
  • PHP 8.0

    The issue particularly affects sites running on PHP version 8.0.0 or later.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024