Make WordPress Core

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#22295 closed defect (bug) (duplicate)

wp_convert_bytes_to_hr(): annoying notice if 0 bytes and deprecated or not?

Reported by: michelwppi's profile michelwppi Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.4.2
Component: Formatting Keywords:
Focuses: Cc:

Description

wp_convert_bytes_to_hr used in wp_import_upload_form show an annoying notice when param $bytes has zero value. (unwanted indice) .
After searching in the tracs before publishing this report, it was announced in #19067 (9 month ago) that wp_convert_bytes_to_hr will be soon deprecated.
Is it possible to do that and replace this function by size_format() in wp_import_upload_form() of template.php because size_format() shows a good behavior with zero bytes...
Test also in 3.5 beta 2 with same unwanted notice.
M.

Change History (3)

#1 follow-up: @SergeyBiryukov
12 years ago

  • Keywords close added

wp_convert_bytes_to_hr will be soon deprecated. Is it possible to do that and replace this function by size_format() in wp_import_upload_form()

The patch on #19067 does exactly that. Suggest closing as a duplicate of that ticket, unless we also want to fix the notice in wp_convert_bytes_to_hr().

#2 in reply to: ↑ 1 @F J Kaiser
12 years ago

  • Resolution set to duplicate
  • Status changed from new to closed
  • Summary changed from wp_convert_bytes_to_hr : annoying notice if 0 bytes and deprecated or not ? to has_post_format() should accept an array

Replying to SergeyBiryukov:

The patch on #19067 does exactly that. Suggest closing as a duplicate of that ticket, unless we also want to fix the notice in wp_convert_bytes_to_hr().

+1 - No need to maintain two functions that do nearly the same and the other ticket has supporters.

#3 @SergeyBiryukov
12 years ago

  • Keywords close removed
  • Milestone Awaiting Review deleted
  • Summary changed from has_post_format() should accept an array to wp_convert_bytes_to_hr(): annoying notice if 0 bytes and deprecated or not?

Duplicate of #19067.

Note: See TracTickets for help on using tickets.