|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2011-01-11 13:38 UTC] dubuscyr at gmail dot com
Description:
------------
Hi,
I'm reporting this bug because I've just spent 4 hours on it...
When you set the locale LC_ALL to fr_FR.utf-8 (and maybe others) you cannot pass a float number to functions like ImagickDraw::line(a,b,c,d). It throws an exception (code 460)
If you replace fr_FR.utf-8 by us_US.utf8 in the code below, it works fine !
Reproduce code:
---------------
<?php
setlocale(LC_ALL, 'fr_FR.utf-8');
try
{
$image = new Imagick();
$image->newImage( 400, 400, new ImagickPixel( 'wheat' ) );
$draw = new ImagickDraw();
$draw->line(0, 0, 0, 100.5);
$image->drawImage( $draw );
$image->setImageFormat( "png" );
header( "Content-Type: image/png" );
echo $image;
exit;
}
catch (Exception $e)
{
print_r($e);
}
?>
Expected result:
----------------
An image should be drawn
Actual result:
--------------
Exception 460 thrown
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 05:00:01 2025 UTC |
Try: ini_set('imagick.locale_fix', 1);Hi, Thank you for your (really) quick answer. Unfortunately your fix is not working. I've added ini_set('imagick.locale_fix', 1); at the top of the reproduce code, and the error is still there.