From 32ecd29b07c93574e266f7aaa965ad1597714b02 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Tue, 20 Jan 2009 18:03:19 +0000 Subject: [PATCH] MFB: Added an E_NOTICE when precision value is truncated --- ext/standard/formatted_print.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/standard/formatted_print.c b/ext/standard/formatted_print.c index 455e416ea9..1da0b37eee 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; } -- 2.50.1