#37686 [NEW]: imagefttext problem with varible like $a[$b]
| From: | rafal dot bartoszek at gmail dot com | Date: | Sat, 03 Jun 2006 13:26:52 +0000 |
| Subject: | #37686 [NEW]: imagefttext problem with varible like $a[$b] | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-97998@lists.php.net to get a copy of this message | ||
From: rafal dot bartoszek at gmail dot com
Operating system: windows 98
PHP version: 5.1.4
PHP Bug Type: GD related
Bug description: imagefttext problem with varible like $a[$b]
Description:
------------
pleas run the script and take look on the last line of source
imagettftext has the same problem.PHP 5.0.2
probably imagefttext have problem witch varible like $a[$b]
Reproduce code:
---------------
<?php
function create_img($kod){
$img = imagecreatetruecolor(200, 50);
$arr= str_split((string)$kod);
for($i=0; $i<5; $i++){
imagefttext($img, '30', '0', (5+$i*26), '40',
hexdec('FFFFFF'), 'Arial',
$arr[$i]);
}
header('Content-type: image/png');
echo imagepng($img);
echo '
kod = '.$kod.'
arr =
'.$arr['0'].$arr['1'].$arr['2'].$arr['3'].$arr['4'];
}
create_img(rand(10000,99999));
?>
Expected result:
----------------
look source(i mean Ctr+U in mozilla)
Actual result:
--------------
look image
--
Edit bug report at http://bugs.php.net/?id=37686&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37686&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=37686&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37686&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=37686&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=37686&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=37686&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=37686&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=37686&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=37686&r=support
Expected behavior: http://bugs.php.net/fix.php?id=37686&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=37686&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=37686&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=37686&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37686&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=37686&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=37686&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=37686&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=37686&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=37686&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=37686&r=mysqlcfg