#30120 [Asn]: imagettftext() and imagettfbbox() has superfluous optional parameter

From: Date: Fri, 14 Jan 2005 21:41:00 +0000
Subject: #30120 [Asn]: imagettftext() and imagettfbbox() has superfluous optional parameter
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-72179@lists.php.net to get a copy of this message
ID: 30120 Updated by: sniper@php.net Reported By: vrana@php.net Status: Assigned Bug Type: GD related -Operating System: Irrelevant +Operating System: * -PHP Version: 5.0.1 +PHP Version: 4CVS, 5CVS (2005-01-14) Assigned To: pajoye New Comment: Previous Comments: ------------------------------------------------------------------------ [2004-11-29 09:49:28] vrana@php.net imagettftext() can be called with 5 parameters after this patch but the 5th parameter is meaningless. PHP should issue warning "Wrong parameter count" if 5 parameters are passed. It may be easily overlooked - there are two functions - imageFTtext() and imageTTFtext(). The first should be called with 4 or 5 parameters, the second only with 4. ------------------------------------------------------------------------ [2004-11-29 09:26:33] pajoye@php.net As far as I can see, the amount of arguments did not change after this patch. Even if it did, which side effect are youl talking about? --Pierre ------------------------------------------------------------------------ [2004-11-28 17:01:21] vrana@php.net Before patch, imagettftext() could be called with 4 parameters. Now it's possible to call it with 4 or 5 parameter but the 5th parameter is superfluous. The patch was made to allow 5th parameter of imagefttext() be optional but unnecessary side-effect was that 5th parameter of imagettftext() was allowed. ------------------------------------------------------------------------ [2004-11-28 15:32:41] tony2001@php.net I'm not quite sure I understand what are you talking about, Jakub. Could you plz explain how Ilia could add parameter while he made it optional? ------------------------------------------------------------------------ [2004-09-16 17:09:03] vrana@php.net Description: ------------ Since PHP 4.3.5 (precisely since patch http://cvs.php.net/diff.php/php-src/ext/gd/gd.c?r1=1.279&r2=1.280&ty=u), these two functions has superfluous optional parameter. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=30120&edit=1

« previous php.bugs (#72179) next »