From 4aaa2becbe37998582d7adc80873612c91ed3cfd Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Mon, 22 Sep 2003 23:27:51 +0000 Subject: String format stuff. --- ext/mysql/php_mysql.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'ext/mysql/php_mysql.c') diff --git a/ext/mysql/php_mysql.c b/ext/mysql/php_mysql.c index e720c35a43..f4431d31e6 100644 --- a/ext/mysql/php_mysql.c +++ b/ext/mysql/php_mysql.c @@ -425,9 +425,7 @@ PHP_RSHUTDOWN_FUNCTION(mysql) { if (MySG(trace_mode)) { if (MySG(result_allocated)){ - char tmp[128]; - sprintf((char *)&tmp, "%lu result set(s) not freed. Use mysql_free_result to free result sets which were requested using mysql_query()", MySG(result_allocated)); - php_error_docref("function.mysql-free-result" TSRMLS_CC, E_WARNING, tmp); + php_error_docref("function.mysql-free-result" TSRMLS_CC, E_WARNING, "%lu result set(s) not freed. Use mysql_free_result to free result sets which were requested using mysql_query()", MySG(result_allocated)); } } @@ -1239,7 +1237,7 @@ static void php_mysql_do_query_general(zval **query, zval **mysql_link, int link mysql_real_query(&mysql->conn, newquery, strlen(newquery)); efree (newquery); if (mysql_errno(&mysql->conn)) { - php_error_docref("http://www.mysql.com/doc" TSRMLS_CC, E_WARNING, mysql_error(&mysql->conn)); + php_error_docref("http://www.mysql.com/doc" TSRMLS_CC, E_WARNING, "%s", mysql_error(&mysql->conn)); RETURN_FALSE; } else { @@ -1272,7 +1270,7 @@ static void php_mysql_do_query_general(zval **query, zval **mysql_link, int link /* check possible error */ if (MySG(trace_mode)){ if (mysql_errno(&mysql->conn)){ - php_error_docref("http://www.mysql.com/doc" TSRMLS_CC, E_WARNING, mysql_error(&mysql->conn)); + php_error_docref("http://www.mysql.com/doc" TSRMLS_CC, E_WARNING, "%s", mysql_error(&mysql->conn)); } } RETURN_FALSE; -- cgit v1.2.1