summaryrefslogtreecommitdiff
path: root/ext/mysql/php_mysql.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2003-09-22 23:28:09 +0000
committerIlia Alshanetsky <iliaa@php.net>2003-09-22 23:28:09 +0000
commit05331829c67fef7fd9e716c929fd6fd92209de8a (patch)
tree2b43d5266e6fc40e00c1c38756e0d29f620ef4ab /ext/mysql/php_mysql.c
parent258d90d1012fa3d17b2eb00c75957460bfc1e78f (diff)
downloadphp-git-05331829c67fef7fd9e716c929fd6fd92209de8a.tar.gz
MFH: string format stuff.
Diffstat (limited to 'ext/mysql/php_mysql.c')
-rw-r--r--ext/mysql/php_mysql.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/ext/mysql/php_mysql.c b/ext/mysql/php_mysql.c
index e601a6d708..049ec01f6c 100644
--- a/ext/mysql/php_mysql.c
+++ b/ext/mysql/php_mysql.c
@@ -437,9 +437,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 {
@@ -1262,7 +1260,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;