php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #49613 imagettfbbox(): Undocumented return value
Submitted: 2009-09-21 13:18 UTC Modified: 2009-10-02 21:04 UTC
From: bugs dot php at luden dot se Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2009-09-21 13:18 UTC] bugs dot php at luden dot se
Description:
------------
The GD functions imagettfbbox() returns FALSE for various errors
such as a missing $fontfile. This return value is undocumented at:

  <http://se2.php.net/manual/en/function.imagettfbbox.php>

Same problem for imagettftext():

  <http://se2.php.net/manual/en/function.imagettftext.php>

(The results are from PHP 5.2.5 but recently downloaded source
 code for 5.3.0 contain several RETURN_FALSE.)


Reproduce code:
---------------
<?php

  $r = imagettfbbox (10, 0, 'no-such-font.ttf', 'Test string');
  echo PHP_VERSION, "\n";
  var_dump ($r);


Expected result:
----------------
5.2.5
bool(false)


Actual result:
--------------
5.2.5
bool(false)


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-10-02 21:01 UTC] svn@php.net
Automatic comment from SVN on behalf of fa
Revision: http://svn.php.net/viewvc/?view=revision&revision=289103
Log: added return value "false" and table header - fix #49613
 [2009-10-02 21:03 UTC] svn@php.net
Automatic comment from SVN on behalf of fa
Revision: http://svn.php.net/viewvc/?view=revision&revision=289104
Log: added return "false" on error - fix #49613 (the sequel)
 [2009-10-02 21:04 UTC] fa@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 [2020-02-07 06:09 UTC] phpdocbot@php.net
Automatic comment on behalf of fa
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=3e66a5c8120aacc63b685ffa67f4534572630cbd
Log: added return &quot;false&quot; on error - fix #49613 (the sequel)
 [2020-02-07 06:09 UTC] phpdocbot@php.net
Automatic comment on behalf of fa
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=e622354c1ba891b94d5c832a32cf0bf9f0edc09d
Log: added return value &quot;false&quot; and table header - fix #49613
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 18:00:02 2026 UTC