Make WordPress Core


Ignore:
Timestamp:
06/03/2020 05:38:56 PM (4 years ago)
Author:
desrosj
Message:

General: Continuing to work towards a passing PHP Compatibility scan.

This is a final pass to fix PHP compatibiilty issues in the codebase with code changes or adding phpcs:ignore comments.

With this change, all PHP compatibility warnings and errors without specific tickets have been addressed (see #49810 and #41750).

Props desrosj, johnbillion, jrf.
See #49922.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/capabilities.php

    r47808 r47902  
    291291        case 'delete_user_meta':
    292292        case 'add_user_meta':
    293             list( $_, $object_type, $_ ) = explode( '_', $cap );
    294             $object_id                   = (int) $args[0];
     293            $object_type = explode( '_', $cap )[1];
     294            $object_id   = (int) $args[0];
    295295
    296296            $object_subtype = get_object_subtype( $object_type, $object_id );
Note: See TracChangeset for help on using the changeset viewer.