|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #79415 gd 2.3.0 + imagettfbbox with empty text generates warning
Submitted: 2020-03-26 08:30 UTC Modified: 2020-05-05 10:07 UTC
Avg. Score:3.5 ± 1.5
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: manuel dot vacelet+php at enalean dot com Assigned: cmb (profile)
Status: Not a bug Package: GD related
PHP Version: 7.3.16 OS: centos
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: manuel dot vacelet+php at enalean dot com
New email:
PHP Version: OS:


 [2020-03-26 08:30 UTC] manuel dot vacelet+php at enalean dot com
Last version of gd (2.3.x) changes the behaviour of some gd functions with empty text, see example bellow

Impacted functions (at least)
- imagettfbbox
- imagettftext

Test script:
With gd 2.3.0 + php 7.3.16 (centos7, remi repos)

imagettfbbox(9, 0, '/usr/share/fonts/dejavu/DejaVuSans.ttf', '');
PHP Warning:  imagettfbbox(): Problem doing text layout in php shell code on line 1

With gd 2.2.5 + php 7.3.15 (centos7, remi repos)

imagettfbbox(9, 0, '/usr/share/fonts/dejavu/DejaVuSans.ttf', '')


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2020-03-26 11:55 UTC]
-Status: Open +Status: Suspended
 [2020-03-26 11:55 UTC]
I can confirm the behavioral change, and filed a upstream bug
report[1].  Let's see whether that gets acknowledged as bug.

[1] <>
 [2020-05-05 10:07 UTC]
-Status: Suspended +Status: Not a bug -Assigned To: +Assigned To: cmb
 [2020-05-05 10:07 UTC]
This has been acknowledged as upstream bug (and already fixed), so
this is not a PHP bug.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Apr 10 20:01:24 2021 UTC