Skip to content

Commit 44ec7e7

Browse files
author
nono303
committed
Fix non-working condition with CURLVERSION_NOW using age
1 parent e622695 commit 44ec7e7

File tree

1 file changed

+7
-15
lines changed

1 file changed

+7
-15
lines changed

ext/curl/interface.c

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -379,25 +379,17 @@ PHP_MINFO_FUNCTION(curl)
379379
if (d->libz_version) {
380380
php_info_print_table_row(2, "Zlib Version", d->libz_version);
381381
}
382-
383-
#if defined(CURLVERSION_SECOND) && CURLVERSION_NOW >= CURLVERSION_SECOND
384-
if (d->ares) {
382+
if (d->age >= CURLVERSION_SECOND && d->ares) {
385383
php_info_print_table_row(2, "c-ares Version", d->ares);
386384
}
387-
#endif
388-
389-
#if defined(CURLVERSION_THIRD) && CURLVERSION_NOW >= CURLVERSION_THIRD
390-
if (d->libidn) {
391-
php_info_print_table_row(2, "libIDN Version", d->libidn);
385+
if (d->age >= CURLVERSION_THIRD && d->libidn) {
386+
php_info_print_table_row(2, "Libidn Version", d->libidn);
392387
}
393-
#endif
394-
395-
if (d->iconv_ver_num) {
396-
php_info_print_table_row(2, "IconV Version", d->iconv_ver_num);
388+
if (d->age >= CURLVERSION_FOURTH && d->iconv_ver_num) {
389+
php_info_print_table_row(2, "Iconv Version", d->iconv_ver_num);
397390
}
398-
399-
if (d->libssh_version) {
400-
php_info_print_table_row(2, "libSSH Version", d->libssh_version);
391+
if (d->age >= CURLVERSION_FOURTH && d->libssh_version) {
392+
php_info_print_table_row(2, "Libssh Version", d->libssh_version);
401393
}
402394

403395
php_info_print_table_end();

0 commit comments

Comments
 (0)