Fix all PHP 8.1 compatibility issues in Views so that the tests can run correctly.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

DamienMcKenna created an issue. See original summary.

DamienMcKenna’s picture

The current tests show the following:

ViewsArgumentDefaultTest
testArgumentDefaultNoOptions
✗	
drupal_validate_utf8
exception: [Deprecated function] Line 1936 of includes/bootstrap.inc:
strlen(): Passing null to parameter #1 ($string) of type string is deprecated
✗	
filter_xss
exception: [Deprecated function] Line 1503 of includes/common.inc:
str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated
ViewsHandlerSortDateTest
testDateOrdering
✗	
views_get_timezone
exception: [Deprecated] Line 1249 of sites/all/modules/views/includes/handlers.inc:
strlen(): Passing null to parameter #1 ($string) of type string is deprecated

exception: [Deprecated] Line 1249 of sites/all/modules/views/includes/handlers.inc:
strlen(): Passing null to parameter #1 ($string) of type string is deprecated

exception: [Deprecated] Line 1249 of sites/all/modules/views/includes/handlers.inc:
strlen(): Passing null to parameter #1 ($string) of type string is deprecated

exception: [Deprecated] Line 1249 of sites/all/modules/views/includes/handlers.inc:
strlen(): Passing null to parameter #1 ($string) of type string is deprecated

exception: [Deprecated] Line 1249 of sites/all/modules/views/includes/handlers.inc:
strlen(): Passing null to parameter #1 ($string) of type string is deprecated

exception: [Deprecated] Line 1249 of sites/all/modules/views/includes/handlers.inc:
strlen(): Passing null to parameter #1 ($string) of type string is deprecated

exception: [Deprecated] Line 1249 of sites/all/modules/views/includes/handlers.inc:
strlen(): Passing null to parameter #1 ($string) of type string is deprecated

exception: [Deprecated] Line 1249 of sites/all/modules/views/includes/handlers.inc:
strlen(): Passing null to parameter #1 ($string) of type string is deprecated

exception: [Deprecated] Line 1249 of sites/all/modules/views/includes/handlers.inc:
strlen(): Passing null to parameter #1 ($string) of type string is deprecated

exception: [Deprecated] Line 1249 of sites/all/modules/views/includes/handlers.inc:
strlen(): Passing null to parameter #1 ($string) of type string is deprecated
ViewsUpgradeTestCase
✗	
drupal_validate_utf8
exception: [Deprecated function] Line 1936 of includes/bootstrap.inc:
strlen(): Passing null to parameter #1 ($string) of type string is deprecated

exception: [Deprecated function] Line 1936 of includes/bootstrap.inc:
strlen(): Passing null to parameter #1 ($string) of type string is deprecated
✗	
filter_xss
exception: [Deprecated function] Line 1503 of includes/common.inc:
str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated

exception: [Deprecated function] Line 1503 of includes/common.inc:
str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated
ViewsViewTest
views_get_timezone
exception: [Deprecated] Line 1249 of sites/all/modules/views/includes/handlers.inc:
strlen(): Passing null to parameter #1 ($string) of type string is deprecated

exception: [Deprecated] Line 1249 of sites/all/modules/views/includes/handlers.inc:
strlen(): Passing null to parameter #1 ($string) of type string is deprecated

exception: [Deprecated] Line 1249 of sites/all/modules/views/includes/handlers.inc:
strlen(): Passing null to parameter #1 ($string) of type string is deprecated

exception: [Deprecated] Line 1249 of sites/all/modules/views/includes/handlers.inc:
strlen(): Passing null to parameter #1 ($string) of type string is deprecated

exception: [Deprecated] Line 1249 of sites/all/modules/views/includes/handlers.inc:
strlen(): Passing null to parameter #1 ($string) of type string is deprecated

exception: [Deprecated] Line 1249 of sites/all/modules/views/includes/handlers.inc:
strlen(): Passing null to parameter #1 ($string) of type string is deprecated

exception: [Deprecated] Line 1249 of sites/all/modules/views/includes/handlers.inc:
strlen(): Passing null to parameter #1 ($string) of type string is deprecated

exception: [Deprecated] Line 1249 of sites/all/modules/views/includes/handlers.inc:
strlen(): Passing null to parameter #1 ($string) of type string is deprecated

exception: [Deprecated] Line 1249 of sites/all/modules/views/includes/handlers.inc:
strlen(): Passing null to parameter #1 ($string) of type string is deprecated

exception: [Deprecated] Line 1249 of sites/all/modules/views/includes/handlers.inc:
strlen(): Passing null to parameter #1 ($string) of type string is deprecated

exception: [Deprecated] Line 1249 of sites/all/modules/views/includes/handlers.inc:
strlen(): Passing null to parameter #1 ($string) of type string is deprecated

exception: [Deprecated] Line 1249 of sites/all/modules/views/includes/handlers.inc:
strlen(): Passing null to parameter #1 ($string) of type string is deprecated

exception: [Deprecated] Line 1249 of sites/all/modules/views/includes/handlers.inc:
strlen(): Passing null to parameter #1 ($string) of type string is deprecated

exception: [Deprecated] Line 1249 of sites/all/modules/views/includes/handlers.inc:
strlen(): Passing null to parameter #1 ($string) of type string is deprecated

exception: [Deprecated] Line 1249 of sites/all/modules/views/includes/handlers.inc:
strlen(): Passing null to parameter #1 ($string) of type string is deprecated

exception: [Deprecated] Line 1249 of sites/all/modules/views/includes/handlers.inc:
strlen(): Passing null to parameter #1 ($string) of type string is deprecated

exception: [Deprecated] Line 1249 of sites/all/modules/views/includes/handlers.inc:
strlen(): Passing null to parameter #1 ($string) of type string is deprecated

exception: [Deprecated] Line 1249 of sites/all/modules/views/includes/handlers.inc:
strlen(): Passing null to parameter #1 ($string) of type string is deprecated

exception: [Deprecated] Line 1249 of sites/all/modules/views/includes/handlers.inc:
strlen(): Passing null to parameter #1 ($string) of type string is deprecated

exception: [Deprecated] Line 1249 of sites/all/modules/views/includes/handlers.inc:
strlen(): Passing null to parameter #1 ($string) of type string is deprecated

exception: [Deprecated] Line 1249 of sites/all/modules/views/includes/handlers.inc:
strlen(): Passing null to parameter #1 ($string) of type string is deprecated

exception: [Deprecated] Line 1249 of sites/all/modules/views/includes/handlers.inc:
strlen(): Passing null to parameter #1 ($string) of type string is deprecated

exception: [Deprecated] Line 1249 of sites/all/modules/views/includes/handlers.inc:
strlen(): Passing null to parameter #1 ($string) of type string is deprecated

exception: [Deprecated] Line 1249 of sites/all/modules/views/includes/handlers.inc:
strlen(): Passing null to parameter #1 ($string) of type string is deprecated

exception: [Deprecated] Line 1249 of sites/all/modules/views/includes/handlers.inc:
strlen(): Passing null to parameter #1 ($string) of type string is deprecated

exception: [Deprecated] Line 1249 of sites/all/modules/views/includes/handlers.inc:
strlen(): Passing null to parameter #1 ($string) of type string is deprecated

exception: [Deprecated] Line 1249 of sites/all/modules/views/includes/handlers.inc:
strlen(): Passing null to parameter #1 ($string) of type string is deprecated

exception: [Deprecated] Line 1249 of sites/all/modules/views/includes/handlers.inc:
strlen(): Passing null to parameter #1 ($string) of type string is deprecated

exception: [Deprecated] Line 1249 of sites/all/modules/views/includes/handlers.inc:
strlen(): Passing null to parameter #1 ($string) of type string is deprecated

exception: [Deprecated] Line 1249 of sites/all/modules/views/includes/handlers.inc:
strlen(): Passing null to parameter #1 ($string) of type string is deprecated
DamienMcKenna’s picture

There's other detail available via the "views_debug" section of the output.

DamienMcKenna’s picture

This should resolve the problem with includes/handlers.inc.

DamienMcKenna’s picture

Status: Needs review » Needs work

Needs further work.

DamienMcKenna’s picture

Status: Needs work » Needs review
FileSize
1.42 KB

Does this help?

DamienMcKenna’s picture

Status: Needs review » Needs work

It's annoying - I can't trigger this error locally.

poker10’s picture

DamienMcKenna’s picture

  • DamienMcKenna committed b0eedee on 7.x-3.x
    Issue #3274056 by DamienMcKenna, poker10: PHP 8.1 compatibility.
    
DamienMcKenna’s picture

Status: Postponed » Fixed
Parent issue: » #3232189: Plan for Views 7.x-3.26

Committed. Thank you poker10.

Status: Fixed » Closed (fixed)

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