diff --git a/ext/standard/info.c b/ext/standard/info.c index 1e58b31a0fb25..8e21d77f137c7 100644 --- a/ext/standard/info.c +++ b/ext/standard/info.c @@ -1000,7 +1000,7 @@ PHPAPI ZEND_COLD void php_print_info(int flag) } - if ((flag & PHP_INFO_CREDITS) && !sapi_module.phpinfo_as_text) { + if (flag & PHP_INFO_CREDITS) { php_info_print_hr(); php_print_credits(PHP_CREDITS_ALL & ~PHP_CREDITS_FULLPAGE); } diff --git a/ext/standard/tests/general_functions/bug80771.phpt b/ext/standard/tests/general_functions/bug80771.phpt new file mode 100644 index 0000000000000..a8c9e7b542936 --- /dev/null +++ b/ext/standard/tests/general_functions/bug80771.phpt @@ -0,0 +1,16 @@ +--TEST-- +Bug #80771 (phpinfo(INFO_CREDITS) displays nothing in CLI) +--FILE-- + +--EXPECT-- +bool(true) diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index 91f400aca4cfd..0fd167de63d5a 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -642,7 +642,7 @@ static int do_cli(int argc, char **argv) /* {{{ */ goto err; } request_started = 1; - php_print_info(0xFFFFFFFF); + php_print_info(PHP_INFO_ALL & ~PHP_INFO_CREDITS); php_output_end_all(); exit_status = (c == '?' && argc > 1 && !strchr(argv[1], c)); goto out;