php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37686 imagefttext problem with varible like $a[$b]
Submitted: 2006-06-03 13:26 UTC Modified: 2006-06-03 13:44 UTC
From: rafal dot bartoszek at gmail dot com Assigned:
Status: Not a bug Package: GD related
PHP Version: 5.1.4 OS: windows 98
Private report: No CVE-ID: None
 [2006-06-03 13:26 UTC] rafal dot bartoszek at gmail dot com
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 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-06-03 13:36 UTC] derick@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

.
 [2006-06-03 13:44 UTC] rafal dot bartoszek at gmail dot com
i'm sorry i wrong intertret bug if i change line:
create_img(rand(10000,99999));
on for example:
create_img(12345);
everthings look ok so mybe the problem is rand();
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 02:01:30 2024 UTC