Why not use php_error_docref which automatically uses new
error message format with functionname?

marcus

At 06:35 11.11.2002, Jason Greene wrote:
jason Mon Nov 11 00:35:05 2002 EDT

Modified files:
/php4/ext/standard math.c
Log:
Report function name when log() triggers a base warning


Index: php4/ext/standard/math.c
diff -u php4/ext/standard/math.c:1.94 php4/ext/standard/math.c:1.95
--- php4/ext/standard/math.c:1.94 Mon Nov 11 00:21:35 2002
+++ php4/ext/standard/math.c Mon Nov 11 00:35:04 2002
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/

-/* $Id: math.c,v 1.94 2002/11/11 05:21:35 jason Exp $ */
+/* $Id: math.c,v 1.95 2002/11/11 05:35:04 jason Exp $ */

#include "php.h"
#include "php_math.h"
@@ -542,7 +542,7 @@
convert_to_double_ex(base);

if (Z_DVAL_PP(base) <= 0.0) {
- php_error(E_WARNING, "base must be greater than 0", Z_DVAL_PP(base));
+ php_error(E_WARNING, "log(): base must be greater than 0", Z_DVAL_PP(base));
RETURN_FALSE;
}
RETURN_DOUBLE(log(Z_DVAL_PP(num)) / log(Z_DVAL_PP(base)));



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to