[wp-trac] [WordPress Trac] #63235: Getting "Overriding WordPress globals is prohibited. Found assignment to $post" errors into the core files.

WordPress Trac noreply at wordpress.org
Fri Apr 4 10:49:26 UTC 2025


#63235: Getting "Overriding WordPress globals is prohibited. Found assignment to
$post" errors into the core files.
-------------------------+-------------------------------------------------
 Reporter:  viralsampat  |      Owner:  (none)
     Type:  defect       |     Status:  new
  (bug)                  |
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  General      |    Version:
 Severity:  normal       |   Keywords:  dev-feedback 2nd-opinion needs-
  Focuses:  coding-      |  testing
  standards              |
-------------------------+-------------------------------------------------
 Hello Team,

 I have checked WordPress core files and I have found this "Overriding
 WordPress globals is prohibited. Found assignment to $post" error for few
 files. I think that it should be resolve.

 src/wp-includes/blocks/latest-posts.php
 src/wp-includes/wp-includes/blocks/comments.php
 src/wp-includes/class-wp-block.php
 src/wp-includes/class-wp-query.php
 src/wp-includes/widgets/class-wp-widget-custom-html.php
 src/wp-includes/widgets/class-wp-widget-text.php
 src/wp-includes/rest-api/endpoints/class-wp-rest-block-renderer-
 controller.php

 I have tested this into the WordPress 6.8-beta1.

 Thanks,

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/63235>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list