summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/ldap/tests/README2
-rw-r--r--ext/mysql/php_mysql.c16
2 files changed, 9 insertions, 9 deletions
diff --git a/ext/ldap/tests/README b/ext/ldap/tests/README
index 7dccd270f3..b30043abce 100644
--- a/ext/ldap/tests/README
+++ b/ext/ldap/tests/README
@@ -10,7 +10,7 @@ Notes:
It is used for testing ldap_start_tls(), which also requires "TLS_REQCERT never" in client configuration
2. An empty LDAP structure is required for the tests to be PASSed
-(/etc/openldap/)slapd.conf:
+ (/etc/openldap/)slapd.conf:
-----------------------------------------------------------
TLSCACertificateFile /etc/openldap/ssl/server.pem
TLSCertificateFile /etc/openldap/ssl/server.pem
diff --git a/ext/mysql/php_mysql.c b/ext/mysql/php_mysql.c
index 94bfb6cfd2..580296a3cf 100644
--- a/ext/mysql/php_mysql.c
+++ b/ext/mysql/php_mysql.c
@@ -1125,15 +1125,15 @@ PHP_FUNCTION(mysql_close)
mysqlnd_end_psession(mysql->conn);
}
#endif
- if (!mysql_link) {
- --GC_REFCOUNT(res);
+ if (res == MySG(default_link)) {
+ zend_list_delete(res);
MySG(default_link) = NULL;
- } else if (mysql_link && Z_RES_P(mysql_link) == MySG(default_link)) {
- --GC_REFCOUNT(res);
- MySG(default_link) = NULL;
- zend_list_close(res);
- } else {
- zend_list_close(res);
+ }
+ if (mysql_link) {
+ /* we have at least 3 additional references to this resource ??? */
+ if (GC_REFCOUNT(res) <= 3) {
+ zend_list_close(res);
+ }
}
}