[wp-trac] [WordPress Trac] #63478: Remove leftover debug code from Box class
WordPress Trac
noreply at wordpress.org
Sun May 25 15:24:57 UTC 2025
#63478: Remove leftover debug code from Box class
-------------------------+-------------------------------
Reporter: getsyash | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses: coding-standards
-------------------------+-------------------------------
Changes (by SergeyBiryukov):
* component: Formatting => Media
Old description:
> There is a commented-out debug statement {{{ // print_r( $this ); //
> Uncomment to print all boxes.}}} in the {{{Box::parse()}}} method on the
> file {{{/wp-includes/class-box.php }}}
>
> This appears to have been used during development for debugging purposes.
> While it's currently commented out and doesn't affect execution, it's
> generally a good practice to remove unused debug code from production
> files to keep the codebase clean and focused.
>
> Removing this line would help improve readability and align with
> WordPress coding standards for maintainable code.
New description:
There is a commented-out debug statement {{{ // print_r( $this ); //
Uncomment to print all boxes.}}} in the {{{Box::parse()}}} method on the
file {{{/wp-includes/class-avif-info.php }}}
This appears to have been used during development for debugging purposes.
While it's currently commented out and doesn't affect execution, it's
generally a good practice to remove unused debug code from production
files to keep the codebase clean and focused.
Removing this line would help improve readability and align with WordPress
coding standards for maintainable code.
--
Comment:
Hi there, welcome to WordPress Trac! Thanks for the ticket.
For reference, `wp-includes/class-avif-info.php` was introduced in [57524]
/ #51228.
Please note that `libavifinfo` is an external library, any suggested
changes should ideally be submitted upstream:[[BR]]
https://aomedia.googlesource.com/libavifinfo/.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63478#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list