mirror of
https://github.com/php/php-src.git
synced 2024-11-27 20:03:40 +08:00
String format stuff.
This commit is contained in:
parent
63d7df3e2f
commit
4aaa2becbe
@ -255,10 +255,10 @@ static const char * EXIF_ERROR_CORRUPT = "File structure corrupted";
|
||||
static const char * EXIF_ERROR_THUMBEOF = "Thumbnail goes IFD boundary or end of file reached";
|
||||
static const char * EXIF_ERROR_FSREALLOC = "Illegal reallocating of undefined file section";
|
||||
|
||||
#define EXIF_ERRLOG_FILEEOF(ImageInfo) exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, EXIF_ERROR_FILEEOF);
|
||||
#define EXIF_ERRLOG_CORRUPT(ImageInfo) exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, EXIF_ERROR_CORRUPT);
|
||||
#define EXIF_ERRLOG_THUMBEOF(ImageInfo) exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, EXIF_ERROR_THUMBEOF);
|
||||
#define EXIF_ERRLOG_FSREALLOC(ImageInfo) exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, EXIF_ERROR_FSREALLOC);
|
||||
#define EXIF_ERRLOG_FILEEOF(ImageInfo) exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, "%s", EXIF_ERROR_FILEEOF);
|
||||
#define EXIF_ERRLOG_CORRUPT(ImageInfo) exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, "%s", EXIF_ERROR_CORRUPT);
|
||||
#define EXIF_ERRLOG_THUMBEOF(ImageInfo) exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, "%s", EXIF_ERROR_THUMBEOF);
|
||||
#define EXIF_ERRLOG_FSREALLOC(ImageInfo) exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, "%s", EXIF_ERROR_FSREALLOC);
|
||||
/* }}} */
|
||||
|
||||
/* {{{ format description defines
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user