1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Merge branch 'PHP-8.0'

* PHP-8.0:
  Fix #80771: phpinfo(INFO_CREDITS) displays nothing in CLI
This commit is contained in:
Christoph M. Becker
2021-02-22 14:34:45 +01:00
3 changed files with 18 additions and 2 deletions

View File

@@ -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);
}

View File

@@ -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)

View File

@@ -632,7 +632,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();
EG(exit_status) = (c == '?' && argc > 1 && !strchr(argv[1], c));
goto out;