diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2021-02-22 14:34:45 +0100 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2021-02-22 14:34:45 +0100 |
commit | d03be8bf8613571965ec5c033f6dcd607346352a (patch) | |
tree | af92060ba144aaab00bb41e60a4cb4113ed7f16f /ext | |
parent | 59d030c55b6515e448d324bf0f97189aefc554bc (diff) | |
parent | 1d2bbce532a4383210e97ce6b00e210ef2cbaae7 (diff) | |
download | php-git-d03be8bf8613571965ec5c033f6dcd607346352a.tar.gz |
Merge branch 'PHP-8.0'
* PHP-8.0:
Fix #80771: phpinfo(INFO_CREDITS) displays nothing in CLI
Diffstat (limited to 'ext')
-rw-r--r-- | ext/standard/info.c | 2 | ||||
-rw-r--r-- | ext/standard/tests/general_functions/bug80771.phpt | 16 |
2 files changed, 17 insertions, 1 deletions
diff --git a/ext/standard/info.c b/ext/standard/info.c index 8ceef31d9f..cf2273e719 100644 --- a/ext/standard/info.c +++ b/ext/standard/info.c @@ -995,7 +995,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 0000000000..a8c9e7b542 --- /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-- +<?php +ob_start(); +phpinfo(INFO_CREDITS); +$info = ob_get_clean(); + +ob_start(); +phpcredits(); +$credits = ob_get_clean(); + +var_dump(strpos($info, $credits) !== false); +?> +--EXPECT-- +bool(true) |