summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2009-01-20 18:02:35 +0000
committerIlia Alshanetsky <iliaa@php.net>2009-01-20 18:02:35 +0000
commit49295515d7b9712d137cf3ea50f51ff853bdf696 (patch)
tree21c71b1503cae42338fdc3e42c56ed2502707f4b
parent0b3afcf67b35e3ec3929da266a28e5df9df962ff (diff)
downloadphp-git-49295515d7b9712d137cf3ea50f51ff853bdf696.tar.gz
Added an E_NOTICE when precision value is truncated
-rw-r--r--ext/standard/formatted_print.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/standard/formatted_print.c b/ext/standard/formatted_print.c
index ac32dae598..a6b8af783d 100644
--- a/ext/standard/formatted_print.c
+++ b/ext/standard/formatted_print.c
@@ -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;
}