Opened 6 years ago
Last modified 2 years ago
#43668 new defect (bug)
Image cropping fails for many PHP locales, if set
Reported by: | knutsp | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | Media | Keywords: | dev-feedback |
Focuses: | javascript | Cc: |
Description
If{{{#!php
<?php
setlocale( LC_NUMERIC /*or LC_ALL */, 'nb_NO' );
}}}
is used then Media image cropping fails and selection input fields show Infinity
. It works fine with 'en_US', btw.
If #17268 is implemented, I guess it includes use of `setlocale'.
Anyway, image cropping, and other internal passing of numeric data insede an application, should work independently of how numbers are to displayed according to a locale.
I don't know which file or script to look into, to suggest a patch. Any help appreciated.
Change History (3)
#2
@
5 years ago
- Keywords dev-feedback added; reporter-feedback removed
The bug is still there in latest beta.
Install on PHP 7.3.3. Add ´setlocale´ to ´wp-config.php´ with a valid PHP locale string (important).
Using Firefox latest, upload an image to Media. Click "Edit Image" button. Drag the mouse pointer on the image to make a rectangle. Observe Selection field values being filled with Infinity.
Hi @knutsp,
I'm not able to reproduce this bug in WP 5.2-beta3. Can you confirm that this is still an issue, and if so, clarify the steps you used to reproduce this bug?
Thanks.