Skip to content

Commit 3d4169d

Browse files
committed
Fix phpcredits() BC after remove Logo GUIDs
This test was affected: ext/standard/tests/general_functions/phpcredits2.phpt see https://github.com/php/php-src/pull/132/files#diff-3 This makes constant PHP_CREDITS_FULLPAGE didn't functional anymore.
1 parent 1190bc4 commit 3d4169d

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

ext/standard/credits.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@
2727

2828
PHPAPI void php_print_credits(int flag TSRMLS_DC) /* {{{ */
2929
{
30+
if (!sapi_module.phpinfo_as_text && flag & PHP_CREDITS_FULLPAGE) {
31+
php_print_info_htmlhead(TSRMLS_C);
32+
}
33+
3034
if (!sapi_module.phpinfo_as_text) {
3135
PUTS("<h1>PHP Credits</h1>\n");
3236
} else {
@@ -119,6 +123,10 @@ PHPAPI void php_print_credits(int flag TSRMLS_DC) /* {{{ */
119123
CREDIT_LINE("Windows Infrastructure", "Alex Schoenmaker");
120124
php_info_print_table_end();
121125
}
126+
127+
if (!sapi_module.phpinfo_as_text && flag & PHP_CREDITS_FULLPAGE) {
128+
PUTS("</div></body></html>\n");
129+
}
122130
}
123131
/* }}} */
124132

ext/standard/info.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -881,7 +881,7 @@ PHPAPI void php_print_info(int flag TSRMLS_DC)
881881

882882
if ((flag & PHP_INFO_CREDITS) && !sapi_module.phpinfo_as_text) {
883883
php_info_print_hr();
884-
php_print_credits(PHP_CREDITS_ALL TSRMLS_CC);
884+
php_print_credits(PHP_CREDITS_ALL & ~PHP_CREDITS_FULLPAGE TSRMLS_CC);
885885
}
886886

887887
if (flag & PHP_INFO_LICENSE) {

0 commit comments

Comments
 (0)