Make WordPress Core


Ignore:
Timestamp:
09/07/2023 08:39:07 PM (3 years ago)
Author:
hellofromTonya
Message:

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

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

[56349] 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 [56349], [56356], [56530].

See #58896, #57686.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/admin/wpListTable.php

    r56356 r56542  
    390390                $this->expectDeprecation();
    391391                $this->expectDeprecationMessage(
     392                        'WP_List_Table::__get(): ' .
    392393                        'The property `undeclared_property` is not declared. Getting a dynamic property is ' .
    393394                        'deprecated since version 6.4.0! Instead, declare the property on the class.'
     
    419420                $this->expectDeprecation();
    420421                $this->expectDeprecationMessage(
     422                        'WP_List_Table::__set(): ' .
    421423                        'The property `undeclared_property` is not declared. Setting a dynamic property is ' .
    422424                        'deprecated since version 6.4.0! Instead, declare the property on the class.'
     
    451453                $this->expectDeprecation();
    452454                $this->expectDeprecationMessage(
     455                        'WP_List_Table::__isset(): ' .
    453456                        'The property `undeclared_property` is not declared. Checking `isset()` on a dynamic property ' .
    454457                        'is deprecated since version 6.4.0! Instead, declare the property on the class.'
     
    478481                $this->expectDeprecation();
    479482                $this->expectDeprecationMessage(
     483                        'WP_List_Table::__unset(): ' .
    480484                        'A property `undeclared_property` is not declared. Unsetting a dynamic property is ' .
    481485                        'deprecated since version 6.4.0! Instead, declare the property on the class.'
Note: See TracChangeset for help on using the changeset viewer.