diff options
author | Xinchen Hui <laruence@php.net> | 2014-05-11 17:02:08 +0800 |
---|---|---|
committer | Xinchen Hui <laruence@php.net> | 2014-05-11 17:02:08 +0800 |
commit | 446c60c616b95a93a1d26608a95f340353910f37 (patch) | |
tree | 2e1fa532743f20b74dd2b8018bd314a1aeb1ecae /ext/mysqli/mysqli_warning.c | |
parent | 53b930475f3f3e6b6dd727db5f1c565effc04324 (diff) | |
download | php-git-446c60c616b95a93a1d26608a95f340353910f37.tar.gz |
Various bug fixes (now 17 tests fails, it is 11 in trunk)
Diffstat (limited to 'ext/mysqli/mysqli_warning.c')
-rw-r--r-- | ext/mysqli/mysqli_warning.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/mysqli/mysqli_warning.c b/ext/mysqli/mysqli_warning.c index c2290d387c..9b85753dd6 100644 --- a/ext/mysqli/mysqli_warning.c +++ b/ext/mysqli/mysqli_warning.c @@ -132,7 +132,7 @@ MYSQLI_WARNING * php_get_warnings(MYSQLND_CONN_DATA * mysql TSRMLS_DC) result = mysql->m->use_result(mysql, 0 TSRMLS_CC); for (;;) { - zval **entry; + zval *entry; int errno; MAKE_STD_ZVAL(row); @@ -146,15 +146,15 @@ MYSQLI_WARNING * php_get_warnings(MYSQLND_CONN_DATA * mysql TSRMLS_DC) zend_hash_move_forward(Z_ARRVAL_P(row)); /* 1. Here comes the error no */ - zend_hash_get_current_data(Z_ARRVAL_P(row), (void **)&entry); + entry = zend_hash_get_current_data(Z_ARRVAL_P(row)); convert_to_long_ex(entry); - errno = Z_LVAL_PP(entry); + errno = Z_LVAL_P(entry); zend_hash_move_forward(Z_ARRVAL_P(row)); /* 2. Here comes the reason */ - zend_hash_get_current_data(Z_ARRVAL_P(row), (void **)&entry); + entry = zend_hash_get_current_data(Z_ARRVAL_P(row)); - w = php_new_warning(*entry, errno TSRMLS_CC); + w = php_new_warning(entry, errno TSRMLS_CC); /* Don't destroy entry, because the row destroy will decrease the refcounter. Decreased twice then mysqlnd_free_result() @@ -245,7 +245,7 @@ zval *mysqli_warning_errno(mysqli_object *obj, zval *retval TSRMLS_DC) } w = (MYSQLI_WARNING *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr; ZVAL_LONG(retval, w->errorno); - return SUCCESS; + return retval; } /* }}} */ |