Make WordPress Core


Ignore:
Timestamp:
09/07/2023 08:43:48 PM (15 months ago)
Author:
hellofromTonya
Message:

Code Modernization: Use wp_trigger_error() in WP_User_Query magic methods.

Replaces trigger_error() with wp_trigger_error() in each of the WP_User_Query magic methods.

[56353] added the dynamic properties deprecation messages to the __get(), __set(), __isset(), __unset() magic methods. Since that commit, wp_trigger_error() was introduced (see [56530]) as a wrapper for trigger_error().

Follow-up to [56353], [56530].

See #58897, #57686.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/user/query.php

    r56353 r56543  
    22542254        $this->expectDeprecation();
    22552255        $this->expectDeprecationMessage(
     2256            'WP_User_Query::__get(): ' .
    22562257            'The property `undefined_property` is not declared. Getting a dynamic property is ' .
    22572258            'deprecated since version 6.4.0! Instead, declare the property on the class.'
     
    22862287        $this->expectDeprecation();
    22872288        $this->expectDeprecationMessage(
     2289            'WP_User_Query::__set(): ' .
    22882290            'The property `undefined_property` is not declared. Setting a dynamic property is ' .
    22892291            'deprecated since version 6.4.0! Instead, declare the property on the class.'
     
    23222324        $this->expectDeprecation();
    23232325        $this->expectDeprecationMessage(
     2326            'WP_User_Query::__isset(): ' .
    23242327            'The property `undefined_property` is not declared. Checking `isset()` on a dynamic property ' .
    23252328            'is deprecated since version 6.4.0! Instead, declare the property on the class.'
     
    23532356        $this->expectDeprecation();
    23542357        $this->expectDeprecationMessage(
     2358            'WP_User_Query::__unset(): ' .
    23552359            'A property `undefined_property` is not declared. Unsetting a dynamic property is ' .
    23562360            'deprecated since version 6.4.0! Instead, declare the property on the class.'
Note: See TracChangeset for help on using the changeset viewer.