Code Modernization: Remove unused dynamic property in WP_Test_REST_Pages_Controller.

Dynamic (non-explicitly declared) properties are deprecated as of PHP 8.2 and are expected to become a fatal error in PHP 9.0.

In this case, it appears that the dynamically created `$has_setup_template` property is not actually used. It is unclear what the original intention was, but since it is undeclared and unused, it can be safely removed.

Follow-up to [38832], [53557], [53558], [53850], [53851], [53852], [53853], [53854], [53856], [53916], [53935], [53936], [53937], [53938], [53942].

Props jrf, antonvlasenko.
See #56033.

git-svn-id: https://develop.svn.wordpress.org/trunk@53945 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2022-08-26 11:43:26 +00:00
parent 541b4eb646
commit 5bdebf4519

View File

@@ -27,7 +27,6 @@ class WP_Test_REST_Pages_Controller extends WP_Test_REST_Post_Type_Controller_Te
public function set_up() {
parent::set_up();
$this->has_setup_template = false;
add_filter( 'theme_page_templates', array( $this, 'filter_theme_page_templates' ) );
// Re-register the route as we now have a template available.
$GLOBALS['wp_rest_server']->override_by_default = true;