Correct PHP 8.0 compat. false-positive

Created on 30 November 2022, almost 3 years ago
Updated 22 October 2025, 21 days ago

Problem/Motivation

Running a phpcs PHP 8.0 compatibility scan produces a false positive in dfp/tests/src/Functional/DisplayTagTest.php:

The behaviour of hexadecimal numeric strings was inconsistent prior to PHP 7 and support has been removed in PHP 7. Found: '0x0'

Steps to reproduce

phpcs -p . --extensions=php,module,inc,install,profile --standard=PHPCompatibility --runtime-set testVersion 8.0

Proposed resolution

Change

$edit['breakpoints[0][browser_size]'] = '0x0';

to

$edit['breakpoints[0][browser_size]'] = '0' . 'x' . '0';

Remaining tasks

N/A

User interface changes

N/A

API changes

N/A

Data model changes

N/A

πŸ› Bug report
Status

Needs work

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States josh.estep

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

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.71.5 2024