From: theboywhogotlost at gmail dot com Operating system: Windows XP, Red Hat linux PHP version: 5.1.4 PHP Bug Type: GD related Bug description: Wrong letters on image.
Description: ------------ I put some letters into an array I then want to get some random letters so I use rand to selet a number between 0 and 25 I then put them together like this $letters[$ran_num]; this works fine. I want 5 random letters so I do it the above useing $ran_num, $ran_num2 ect... I then put $letters[$ran_num], $letters[$ran_num2] into an array called $text. Now on my image I want each random letter to appear I also want a text string of the random letters so I do a foreach($text as $g){$string .= $g; <more code to write letter to image>} teh text on the image is differant than the text in teh string and I'm writeing $g to teh image. Reproduce code: --------------- http://thephpguy.com/gd_bug.zip Requires .gdf font (one font provided) Expected result: ---------------- Letters on image should be the same as the string. Actual result: -------------- Random letters on the image string is correct. -- Edit bug report at http://bugs.php.net/?id=37953&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37953&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=37953&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37953&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=37953&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=37953&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=37953&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=37953&r=needscript Try newer version: http://bugs.php.net/fix.php?id=37953&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=37953&r=support Expected behavior: http://bugs.php.net/fix.php?id=37953&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=37953&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=37953&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=37953&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37953&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=37953&r=dst IIS Stability: http://bugs.php.net/fix.php?id=37953&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=37953&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=37953&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=37953&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=37953&r=mysqlcfg