summaryrefslogtreecommitdiff
path: root/ext/mysql/php_mysql.c
diff options
context:
space:
mode:
authorArnaud Le Blanc <lbarnaud@php.net>2008-10-21 22:06:49 +0000
committerArnaud Le Blanc <lbarnaud@php.net>2008-10-21 22:06:49 +0000
commit5ef7ecafc1e912bda9010c727cfe5c712f9eefb8 (patch)
tree2617dac3c823a86b7af2bf7fbdf9bfee99bedc3f /ext/mysql/php_mysql.c
parent374086f172de2b61115c95eec0a3d8120adf48a0 (diff)
downloadphp-git-5ef7ecafc1e912bda9010c727cfe5c712f9eefb8.tar.gz
initialize optional vars
Diffstat (limited to 'ext/mysql/php_mysql.c')
-rw-r--r--ext/mysql/php_mysql.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/mysql/php_mysql.c b/ext/mysql/php_mysql.c
index 6a946a7a09..6890ad77fc 100644
--- a/ext/mysql/php_mysql.c
+++ b/ext/mysql/php_mysql.c
@@ -1160,7 +1160,7 @@ PHP_FUNCTION(mysql_get_server_info)
Returns a string containing information about the most recent query */
PHP_FUNCTION(mysql_info)
{
- zval *mysql_link;
+ zval *mysql_link = NULL;
int id = -1;
char *str;
php_mysql_conn *mysql;
@@ -2040,8 +2040,8 @@ static void php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type,
#endif
if (into_object) {
- char *class_name;
- int class_name_len;
+ char *class_name = NULL;
+ int class_name_len = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|s&z", &res, &class_name, &class_name_len, UG(utf8_conv), &ctor_params) == FAILURE) {
return;