mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
fileinfo: Show libmagic version with .
in PHPInfo output (#18399)
This makes the output in PHPInfo a little more readable.
This commit is contained in:
parent
7e15a07fea
commit
00affe43aa
1 changed files with 3 additions and 3 deletions
|
@ -115,10 +115,10 @@ ZEND_GET_MODULE(fileinfo)
|
|||
/* {{{ PHP_MINFO_FUNCTION */
|
||||
PHP_MINFO_FUNCTION(fileinfo)
|
||||
{
|
||||
char magic_ver[5];
|
||||
char magic_ver[15];
|
||||
|
||||
(void)snprintf(magic_ver, 4, "%d", magic_version());
|
||||
magic_ver[4] = '\0';
|
||||
int raw_version = magic_version();
|
||||
(void)snprintf(magic_ver, sizeof(magic_ver), "%d.%d", raw_version / 100, raw_version % 100);
|
||||
|
||||
php_info_print_table_start();
|
||||
php_info_print_table_row(2, "fileinfo support", "enabled");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue