From: Ilia Alshanetsky Date: Tue, 20 Jan 2009 18:03:33 +0000 (+0000) Subject: MFB: Added an E_NOTICE when precision value is truncated X-Git-Tag: php-5.4.0alpha1~191^2~4448 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=22839f881e287546c50868373c93de6d6dfe6750;p=php MFB: Added an E_NOTICE when precision value is truncated --- diff --git a/ext/standard/formatted_print.c b/ext/standard/formatted_print.c index d7fcb4be4a..a84513c664 100644 --- a/ext/standard/formatted_print.c +++ b/ext/standard/formatted_print.c @@ -358,6 +358,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; }