summaryrefslogtreecommitdiff
path: root/ext/mysql
diff options
context:
space:
mode:
authorArnaud Le Blanc <lbarnaud@php.net>2008-10-21 22:08:38 +0000
committerArnaud Le Blanc <lbarnaud@php.net>2008-10-21 22:08:38 +0000
commitd69dfa4b9f58e2148f986e0ef5dba91f00c2f639 (patch)
treec86c9f2955005a0c78c9ea5f0e181a0ddf8980a6 /ext/mysql
parent261f0c32a59ba9ecc59f36536ea27bdfdead0939 (diff)
downloadphp-git-d69dfa4b9f58e2148f986e0ef5dba91f00c2f639.tar.gz
MFH: initialize optional vars
Diffstat (limited to 'ext/mysql')
-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 c4c99f03ce..a90dc05373 100644
--- a/ext/mysql/php_mysql.c
+++ b/ext/mysql/php_mysql.c
@@ -1139,7 +1139,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;
@@ -2057,8 +2057,8 @@ static void php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type,
#ifdef ZEND_ENGINE_2
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|sz", &res, &class_name, &class_name_len, &ctor_params) == FAILURE) {
return;