Skip to content

PHP does not report invalid values for file sizes and interpret them incorrectly #7860

Closed
@salarmehr

Description

@salarmehr

Description

There is no error message given if you accidentally use KB, MB or GB instead of K, M or G. and they will be evaluated to some other values. phpinfo() and ini_get() will report what you have written e.g. 1GB , so it will not be clear that there is anything wrong with your setting even though there is.

Expected behaviour:
Show a notice/warning and revert to the default value.

Links:
https://www.php.net/manual/en/faq.using.php#faq.using.shorthandbytes

PHP Version

7., 8.

Operating System

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions