diff options
| author | Dmitry Stogov <dmitry@zend.com> | 2015-07-01 17:01:42 +0300 |
|---|---|---|
| committer | Dmitry Stogov <dmitry@zend.com> | 2015-07-01 17:01:42 +0300 |
| commit | c34651e8f8906f4da1a6b8bd1fc41b9b701a86dd (patch) | |
| tree | dae4bab312e85ab8fd71a36072cf61d26ade9895 /ext/mysqli/mysqli_warning.c | |
| parent | eeaf73439af6d1fb66afeee935039bf67db5d2d6 (diff) | |
| download | php-git-c34651e8f8906f4da1a6b8bd1fc41b9b701a86dd.tar.gz | |
Cleanup (avoid duplication)
Diffstat (limited to 'ext/mysqli/mysqli_warning.c')
| -rw-r--r-- | ext/mysqli/mysqli_warning.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/ext/mysqli/mysqli_warning.c b/ext/mysqli/mysqli_warning.c index 396c6ed7eb..7d69ce62ec 100644 --- a/ext/mysqli/mysqli_warning.c +++ b/ext/mysqli/mysqli_warning.c @@ -99,17 +99,15 @@ MYSQLI_WARNING *php_get_warnings(MYSQL *mysql) #else /* {{{ MYSQLI_WARNING *php_new_warning */ static -MYSQLI_WARNING *php_new_warning(const zval * reason, int errorno) +MYSQLI_WARNING *php_new_warning(zval * reason, int errorno) { MYSQLI_WARNING *w; w = (MYSQLI_WARNING *)ecalloc(1, sizeof(MYSQLI_WARNING)); - ZVAL_DUP(&w->reason, (zval *)reason); + ZVAL_COPY(&w->reason, reason); convert_to_string(&w->reason); - //????ZVAL_UTF8_STRINGL(&(w->reason), Z_STRVAL(w->reason), Z_STRLEN(w->reason), ZSTR_AUTOFREE); - ZVAL_UTF8_STRINGL(&(w->sqlstate), "HY000", sizeof("HY000") - 1, Zzend_string_dupLICATE); w->errorno = errorno; |
