Make WordPress Core


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

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

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

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

See #58898, #57686.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/diff/wpTextDiffRendererTable.php

    r56354 r56544  
    4444        $this->expectDeprecation();
    4545        $this->expectDeprecationMessage(
     46            'WP_Text_Diff_Renderer_Table::__get(): ' .
    4647            'The property `undeclared_property` is not declared. Getting a dynamic property is ' .
    4748            'deprecated since version 6.4.0! Instead, declare the property on the class.'
     
    7374        $this->expectDeprecation();
    7475        $this->expectDeprecationMessage(
     76            'WP_Text_Diff_Renderer_Table::__set(): ' .
    7577            'The property `undeclared_property` is not declared. Setting a dynamic property is ' .
    7678            'deprecated since version 6.4.0! Instead, declare the property on the class.'
     
    105107        $this->expectDeprecation();
    106108        $this->expectDeprecationMessage(
     109            'WP_Text_Diff_Renderer_Table::__isset(): ' .
    107110            'The property `undeclared_property` is not declared. Checking `isset()` on a dynamic property ' .
    108111            'is deprecated since version 6.4.0! Instead, declare the property on the class.'
     
    132135        $this->expectDeprecation();
    133136        $this->expectDeprecationMessage(
     137            'WP_Text_Diff_Renderer_Table::__unset(): ' .
    134138            'A property `undeclared_property` is not declared. Unsetting a dynamic property is ' .
    135139            'deprecated since version 6.4.0! Instead, declare the property on the class.'
Note: See TracChangeset for help on using the changeset viewer.