summaryrefslogtreecommitdiff
path: root/ext/mysqli/mysqli_api.c
diff options
context:
space:
mode:
authorDharman <tekiela246@gmail.com>2021-03-13 17:34:33 +0000
committerDharman <tekiela246@gmail.com>2021-03-17 20:10:18 +0000
commit7e9f6d2a48f8ff6ae458252d395eec1b1d9e6f14 (patch)
tree97ba101d228e2a8042c621599d5ac4fe67abaa73 /ext/mysqli/mysqli_api.c
parenteb8f5e43475e44f8746a2357ed8c3cd60b426eb0 (diff)
downloadphp-git-7e9f6d2a48f8ff6ae458252d395eec1b1d9e6f14.tar.gz
Deprecate OO style mysqli::get_client_info method
Deprecate passing connection object to mysqli_get_client_info() Closes GH-6777.
Diffstat (limited to 'ext/mysqli/mysqli_api.c')
-rw-r--r--ext/mysqli/mysqli_api.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c
index e1abd07135..728e785478 100644
--- a/ext/mysqli/mysqli_api.c
+++ b/ext/mysqli/mysqli_api.c
@@ -1327,6 +1327,10 @@ PHP_FUNCTION(mysqli_get_client_info)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|O!", &mysql_link, mysqli_link_class_entry) == FAILURE) {
RETURN_THROWS();
}
+
+ if (ZEND_NUM_ARGS()) {
+ php_error_docref(NULL, E_DEPRECATED, "Passing connection object as an argument is deprecated");
+ }
}
RETURN_STRING(mysql_get_client_info());