Make WordPress Core

Opened 4 weeks ago

Last modified 4 weeks ago

#63478 new enhancement

Remove leftover debug code from Box class

Reported by: getsyash's profile getsyash Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Media Keywords: has-patch
Focuses: coding-standards Cc:

Description (last modified by SergeyBiryukov)

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.

Change History (2)

This ticket was mentioned in PR #8838 on WordPress/wordpress-develop by @getsyash.


4 weeks ago
#1

  • Keywords has-patch added

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.

Trac ticket: https://core.trac.wordpress.org/ticket/63478

#2 @SergeyBiryukov
4 weeks ago

  • Component changed from Formatting to Media
  • Description modified (diff)

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:
https://aomedia.googlesource.com/libavifinfo/.

Note: See TracTickets for help on using tickets.