Make WordPress Core

Opened 8 months ago

Closed 8 months ago

Last modified 8 months ago

#61054 closed defect (bug) (fixed)

[BugFix] Division by Zero

Reported by: jdekhtiar's profile jdekhtiar Owned by: audrasjb's profile audrasjb
Milestone: 6.6 Priority: normal
Severity: normal Version: 6.5
Component: Media Keywords: has-patch commit
Focuses: Cc:

Description

There is a potential division by Zero bug introduced in dd69139:
`
Warning: Division by zero in htdocs/wp-includes/media.php on line 2134
`

CC: @felixarntz

Change History (5)

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


8 months ago
#1

  • Keywords has-patch added

Prevent bug division by Zero: Warning: Division by zero in htdocs/wp-includes/media.php on line 2134

CC: @felixarntz bug introduced in dd691394f2de7ca4270c2936fd0ea7741d97af5d

TRAC: https://core.trac.wordpress.org/ticket/61054#ticket

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


8 months ago
#2

Prevent bug division by Zero: Warning: Division by zero in htdocs/wp-includes/media.php on line 2134

CC: @felixarntz bug introduced in dd691394f2de7ca4270c2936fd0ea7741d97af5d

TRAC: https://core.trac.wordpress.org/ticket/61054#ticket

#3 @audrasjb
8 months ago

  • Keywords commit added
  • Milestone changed from Awaiting Review to 6.6
  • Owner set to audrasjb
  • Severity changed from major to normal
  • Status changed from new to accepted

Hello and welcome to WordPress Core Trac!

PR6430 looks good to me, thanks for the patch!
Moving for 6.6 consideration.

Introduced in [57294]. See #59352.

#4 @audrasjb
8 months ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 58033:

Media: Prevent division by zero in wp_img_tag_add_width_and_height_attr().

This changesets adds a check for $size_array values to prevent a potential division by zero.
Follow-up to [57294].

Props jdekhtiar.
Fixes #61054.
See #59352.

Note: See TracTickets for help on using tickets.