Skip to content

Commit

Permalink
Added an E_NOTICE when precision value is truncated
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilia Alshanetsky committed Jan 20, 2009
1 parent 0b3afcf commit 4929551
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ext/standard/formatted_print.c
Expand Up @@ -225,6 +225,7 @@ php_sprintf_appenddouble(char **buffer, int *pos,
if ((adjust & ADJ_PRECISION) == 0) {
precision = FLOAT_PRECISION;
} else if (precision > MAX_FLOAT_PRECISION) {
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Requested precision of %d digits was truncated to PHP maximum of %d digits", precision, MAX_FLOAT_PRECISION);
precision = MAX_FLOAT_PRECISION;
}

Expand Down

0 comments on commit 4929551

Please sign in to comment.