Skip to content

Ensure number format functions are consistent for i18n usage #4009

@TheWitness

Description

@TheWitness

Describe the bug

The current number_format() function in php considers a precision of NULL to be to show all the digits when applying the number_format() function. The Cacti wrapper number_format_i18n() does not perform identically. This leads to GUI's that often times do not look as you would expect them to.

To Reproduce

Steps to reproduce the behavior:

  1. print a number > 10000 using number_format($somevalue);

  2. print a number > 10000 using number_format_i18n($somevalue);

  3. Note the differences

Expected behavior

Cactis number_format_i18n() should work identically to the number_format() standard php function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUndesired behaviourresolvedA fixed issue

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions