Make WordPress Core

Changeset 39088


Ignore:
Timestamp:
11/02/2016 05:54:27 AM (10 years ago)
Author:
pento
Message:

Roles: Fix a PHP error introduced in [39082].

The now deprecated WP_Roles::reinit() method was trying to call __deprecated_function(), instead of _deprecated_function().

See 23016.

Location:
trunk
Files:
2 edited

Legend:

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

    r39083 r39088  
    150150         */
    151151        public function reinit() {
    152                 __deprecated_function( __METHOD__, '4.7.0', 'new WP_Roles()' );
     152                _deprecated_function( __METHOD__, '4.7.0', 'new WP_Roles()' );
    153153                $this->_init();
    154154        }
  • trunk/tests/phpunit/tests/user/capabilities.php

    r39082 r39088  
    16551655                $wp_roles->add_role( $this->_role_test_wp_roles_init['role'], $this->_role_test_wp_roles_init['info']['name'], $this->_role_test_wp_roles_init['info']['capabilities'] );
    16561656        }
     1657
     1658        /**
     1659         * @ticket 23016
     1660         * @expectedDeprecated WP_Roles::reinit
     1661         */
     1662        public function test_wp_roles_reinit_deprecated() {
     1663                $wp_roles = new WP_Roles();
     1664                $wp_roles->reinit();
     1665        }
    16571666}
Note: See TracChangeset for help on using the changeset viewer.