Skip to content

Commit faba230

Browse files
committed
Fix bug #68656 Report gd library version
1 parent 316f72c commit faba230

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

ext/gd/config.m4

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ AC_DEFUN([PHP_GD_CHECK_VERSION],[
251251
PHP_CHECK_LIBRARY(gd, gdImageCreateFromJpeg, [AC_DEFINE(HAVE_GD_JPG, 1, [ ])], [], [ $GD_SHARED_LIBADD ])
252252
PHP_CHECK_LIBRARY(gd, gdImageCreateFromXpm, [AC_DEFINE(HAVE_GD_XPM, 1, [ ])], [], [ $GD_SHARED_LIBADD ])
253253
PHP_CHECK_LIBRARY(gd, gdImageStringFT, [AC_DEFINE(HAVE_GD_FREETYPE, 1, [ ])], [], [ $GD_SHARED_LIBADD ])
254+
PHP_CHECK_LIBRARY(gd, gdVersionString, [AC_DEFINE(HAVE_GD_LIBVERSION, 1, [ ])], [], [ $GD_SHARED_LIBADD ])
254255
])
255256

256257
dnl

ext/gd/gd.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1289,7 +1289,14 @@ PHP_MINFO_FUNCTION(gd)
12891289

12901290
/* need to use a PHPAPI function here because it is external module in windows */
12911291

1292+
#if defined(HAVE_GD_BUNDLED)
12921293
php_info_print_table_row(2, "GD Version", PHP_GD_VERSION_STRING);
1294+
#else
1295+
php_info_print_table_row(2, "GD headers Version", PHP_GD_VERSION_STRING);
1296+
#if defined(HAVE_GD_LIBVERSION)
1297+
php_info_print_table_row(2, "GD library Version", gdVersionString());
1298+
#endif
1299+
#endif
12931300

12941301
#ifdef ENABLE_GD_TTF
12951302
php_info_print_table_row(2, "FreeType Support", "enabled");

0 commit comments

Comments
 (0)