Make WordPress Core

Opened 17 months ago

Last modified 17 months ago

#63478 new enhancement

Remove leftover debug code from Box class

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

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.


17 months 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
17 months ago

  • Component Formatting → 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.