Make WordPress Core


Ignore:
Timestamp:
10/07/2026 02:51:56 PM (4 days ago)
Author:
SergeyBiryukov
Message:

Code Quality: Remove redundant array_values() call on IPTC keywords.

When IPTC keywords parsing was added to wp_read_image_metadata(), array_values() was called on $iptc['2#025']. In PHP, iptcparse() returns tag arrays as zero-indexed sequential lists, so calling array_values() on this list has no effect and surfaces an arrayValues.list error in PHPStan.

This was the sole error suppressed in the arrayValues.list PHPStan baseline, so that baseline file is deleted along with its entry in phpstan.neon.dist.

Developed in ​https://github.com/WordPress/wordpress-develop/pull/13978.

Follow-up to r34374.

Props huzaifaalmesbah.
See #65817.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/phpstan.neon.dist

    r64094 r64230  
    2525        - tests/phpstan/baselines/argument.type.neon
    2626        - tests/phpstan/baselines/argument.unresolvableType.neon
    27         - tests/phpstan/baselines/arrayValues.list.neon
    2827        - tests/phpstan/baselines/assign.propertyType.neon
    2928        - tests/phpstan/baselines/binaryOp.invalid.neon
Note: See TracChangeset for help on using the changeset viewer.