summaryrefslogtreecommitdiff
path: root/ext/mysqli/mysqli_nonapi.c
diff options
context:
space:
mode:
authorSammy Kaye Powers <sammyk@sammykmedia.com>2017-01-03 08:01:05 -0600
committerSammy Kaye Powers <sammyk@sammykmedia.com>2017-01-03 08:01:05 -0600
commit1e3624290ab30291765feca1502e8cf3aa773314 (patch)
tree3969ef3a1cd4d8270d050b04b81143166d699224 /ext/mysqli/mysqli_nonapi.c
parent9e29f841ce3711488781be958ffdfc42d738de4a (diff)
parentf0031ed15156e7a07983aba7a9a3155c3eb31252 (diff)
downloadphp-git-1e3624290ab30291765feca1502e8cf3aa773314.tar.gz
Resolve conflict
Diffstat (limited to 'ext/mysqli/mysqli_nonapi.c')
-rw-r--r--ext/mysqli/mysqli_nonapi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/mysqli/mysqli_nonapi.c b/ext/mysqli/mysqli_nonapi.c
index 08817dc7f0..3dba36317d 100644
--- a/ext/mysqli/mysqli_nonapi.c
+++ b/ext/mysqli/mysqli_nonapi.c
@@ -183,6 +183,10 @@ void mysqli_common_connect(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_real_conne
mysqlnd_restart_psession(mysql->mysql);
#endif
MyG(num_active_persistent)++;
+
+ /* clear error */
+ php_mysqli_set_error(mysql_errno(mysql->mysql), (char *) mysql_error(mysql->mysql));
+
goto end;
} else {
mysqli_close(mysql->mysql, MYSQLI_CLOSE_IMPLICIT);