Problem/Motivation

\Drupal\views\Plugin\views\query\Sql::queueTable() uses NULL as an array key in an isset() check
\Drupal\views\Plugin\views\query\Sql::addField tries to use NULL as an array when it is pointless.

Steps to reproduce

Run Drupal\Tests\user\Kernel\Views\HandlerFilterCurrentUserTest and Drupal\Tests\views\Kernel\Handler\HandlerAllTest

Proposed resolution

Don't

Remaining tasks

User interface changes

None

Introduced terminology

N/a

API changes

None

Data model changes

None

Release notes snippet

N/a

Issue fork drupal-3557123

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

alexpott created an issue. See original summary.

alexpott’s picture

Status: Active » Needs review

alexpott’s picture

Title: PHP 8.5 deprecations triggered by \Drupal\views\Plugin\views\query\Sql::queueTable() » PHP 8.5 deprecations triggered by \Drupal\views\Plugin\views\query\Sql
Issue summary: View changes

Let's widen this to include another deprecation triggered by Drupal\Tests\views\Kernel\Handler\HandlerAllTest

smustgrave’s picture

Status: Needs review » Needs work

Ran locally on 8.5.0RC3 and got
2 tests triggered 3 PHP deprecations:
Applied the MR
and still got 1

2 tests triggered 1 PHP deprecation:

1) /var/www/html/core/modules/views/tests/modules/views_test_config/src/Hook/ViewsTestConfigHooks.php:24
Using null as an array offset is deprecated, use an empty string instead

Triggered by:

* Drupal\Tests\user\Kernel\Views\HandlerFilterCurrentUserTest::testFilterCurrentUserAsAnonymous (17 times)
  /var/www/html/core/modules/user/tests/src/Kernel/Views/HandlerFilterCurrentUserTest.php:47

* Drupal\Tests\user\Kernel\Views\HandlerFilterCurrentUserTest::testFilterCurrentUserAsUser (17 times)
  /var/www/html/core/modules/user/tests/src/Kernel/Views/HandlerFilterCurrentUserTest.php:74
alexpott’s picture

Status: Needs work » Needs review

That's a different issue and not \Drupal\views\Plugin\views\query\Sql - see #3557056: Fix \Drupal\views_test_config\Hook\ViewsTestConfigHooks::viewLoad() on PHP 8.5 - the issue summary and title is specific - in both instances.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community
longwave’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed d99619db965 to 11.x and 83118cc0e57 to 11.3.x. Thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • longwave committed 83118cc0 on 11.3.x
    Issue #3557123 by alexpott, smustgrave: PHP 8.5 deprecations triggered...

  • longwave committed d99619db on 11.x
    Issue #3557123 by alexpott, smustgrave: PHP 8.5 deprecations triggered...

longwave’s picture

Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.