Req #81334 [NEW]: -

From: Date: Fri, 06 Aug 2021 08:46:12 +0000
Subject: Req #81334 [NEW]: -
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-235626@lists.php.net to get a copy of this message
From: admin at kapsonfire dot de Operating system: - PHP version: 8.0.9 Package: GD related Bug Type: Feature/Change Request Bug description:- Description: ------------ Since PHP supports spreading named parameters, i'd like to see imagettfbbox and imagettftext using the same paramater names. imagettfbbox uses $string for the text imagettfbbox uses $text for the text Test script: --------------- <?php //header("Content-Type: image/png"); $im = @imagecreate(200, 200) or die("Cannot Initialize new GD image stream"); $background_color = imagecolorallocate($im, 50, 50, 200); $text_color = imagecolorallocate($im, 255,255,255); $fontConfig = [ 'size' => 75, 'angle' => 0, 'font_filename' => "Roboto-Regular.ttf", 'string' => 'PA', ]; $bb = imagettfbbox(...$fontConfig); $w = $bb[2] - $bb[0]; $h = $bb[3] - $bb[1]; imagettftext(...([ 'image' => $im, 'color' => $text_color, 'x' => (100-$w/2), 'y' => (100-$h/2), ]+$fontConfig)); imagepng($im); imagedestroy($im); Expected result: ---------------- No Error Actual result: -------------- Fatal error: Uncaught Error: Unknown named parameter $string in image.php:24 -- Edit bug report at https://bugs.php.net/bug.php?id=81334&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=81334&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=81334&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=81334&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=81334&r=needscript Try newer version: https://bugs.php.net/fix.php?id=81334&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=81334&r=support Expected behavior: https://bugs.php.net/fix.php?id=81334&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=81334&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=81334&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=81334&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=81334&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=81334&r=dst IIS Stability: https://bugs.php.net/fix.php?id=81334&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=81334&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=81334&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=81334&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=81334&r=mysqlcfg

« previous php.bugs (#235626) next »