From caf3e9c3f1c329b496b00501b8baef4dbfc66b4f Mon Sep 17 00:00:00 2001 From: Andrey Hristov Date: Tue, 18 Mar 2008 16:57:31 +0000 Subject: Fixed a bunch of bugs reported in Bug #44352 mysqli_connect_error() false negative for host errors From now on the mysqli object doesn't have that magic properties, like error, which were readable but not visible through isset(), property_exists() and var_dump(). All other ext/mysqli classes were fixed too. Now it will be easier to debug mysqli based applications. --- ext/mysqlnd/mysqlnd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'ext/mysqlnd/mysqlnd.c') diff --git a/ext/mysqlnd/mysqlnd.c b/ext/mysqlnd/mysqlnd.c index bda568bd19..b3ac202441 100644 --- a/ext/mysqlnd/mysqlnd.c +++ b/ext/mysqlnd/mysqlnd.c @@ -805,8 +805,7 @@ err: if (errstr) { DBG_ERR_FMT("[%d] %.64s (trying to connect via %s)", errcode, errstr, conn->scheme); - SET_CLIENT_ERROR(conn->error_info, errcode, UNKNOWN_SQLSTATE, errstr); - + SET_CLIENT_ERROR(conn->error_info, errcode? errcode:CR_CONNECTION_ERROR, UNKNOWN_SQLSTATE, errstr); php_error_docref(NULL TSRMLS_CC, E_WARNING, "[%d] %.64s (trying to connect via %s)", errcode, errstr, conn->scheme); mnd_efree(errstr); -- cgit v1.2.1