Skip to:
Content

BuddyPress.org

Opened 11 years ago

Closed 11 years ago

#5245 closed defect (bug) (fixed)

bp_core_add_cropper_inline_js : float formatting conflict with javascript array

Reported by: olivm's profile olivM Owned by: boonebgorges's profile boonebgorges
Milestone: 1.9 Priority: normal
Severity: normal Version: 1.8.1
Component: Core Keywords: has-patch
Cc:

Description

with some locales ( fr_FR for exemple ) the decimal separator for floating number is the comma.
so in PHP, the result of some division can include a comma.

it will breaks the javascript arrays defined in bp_core_add_cropper_inline_js()

the fix is to round the result of the division

patch attached

Attachments (1)

bp_core_add_cropper_inline_js.patch (509 bytes) - added by olivM 11 years ago.

Download all attachments as: .zip

Change History (3)

#1 @boonebgorges
11 years ago

  • Milestone changed from Awaiting Review to 1.9

Good catch.

#2 @boonebgorges
11 years ago

  • Owner set to boonebgorges
  • Resolution set to fixed
  • Status changed from new to closed

In 7571:

Round calculated image sizes before concatenating cropper JS

Rounding to an integer ensures that we don't have problems with decimal-point
localization, which can produce JS parse errors.

Fixes #5245

Props olivM

Note: See TracTickets for help on using tickets.