php.net |  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
Votes:2
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
 [2020-03-26 08:30 UTC] manuel dot vacelet+php at enalean dot com
Description:
------------
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', '')


Patches

Pull Requests

History

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

[1] <https://github.com/libgd/libgd/issues/615>
 [2020-05-05 10:07 UTC] cmb@php.net
-Status: Suspended +Status: Not a bug -Assigned To: +Assigned To: cmb
 [2020-05-05 10:07 UTC] cmb@php.net
This has been acknowledged as upstream bug (and already fixed), so
this is not a PHP bug.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Nov 22 23:01:29 2024 UTC