|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30120 imagettftext() and imagettfbbox() accept too many parameters
Submitted: 2004-09-16 17:09 UTC Modified: 2005-01-14 23:46 UTC
From: Assigned: pajoye (profile)
Status: Closed Package: GD related
PHP Version: 4CVS, 5CVS (2005-01-14) OS: *
Private report: No CVE-ID: None
 [2004-09-16 17:09 UTC]
Since PHP 4.3.5 (precisely since patch, these two functions has superfluous optional parameter.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-11-28 15:32 UTC]
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-11-28 17:01 UTC]
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-29 09:26 UTC]
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?

 [2004-11-29 09:49 UTC]
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.
 [2005-01-14 23:46 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Mar 03 05:01:28 2024 UTC