diff options
author | Matteo Baccan <matteo.baccan@gmail.com> | 2020-09-14 12:41:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-14 12:41:00 +0200 |
commit | 1211961325ed83c2ea898c2d47a18380e532c0dc (patch) | |
tree | e83efd2cea433874b5e3fac826f1b80f40ce756f /mysql.php | |
parent | bf392d85856358b3dd988d3c7f10a36ac5057607 (diff) | |
download | php-mysql-mysqli-wrapper-1211961325ed83c2ea898c2d47a18380e532c0dc.zip php-mysql-mysqli-wrapper-1211961325ed83c2ea898c2d47a18380e532c0dc.tar.gz php-mysql-mysqli-wrapper-1211961325ed83c2ea898c2d47a18380e532c0dc.tar.bz2 |
Update mysql.php
After PHPStan analysis:
1) mysql_get_client_info : use global resource link
2) mysqli_free_result : have a void return and mysql_free_result a bool return. These functions have not a compatible return. Changed to TRUE the result
Diffstat (limited to 'mysql.php')
-rw-r--r-- | mysql.php | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -272,7 +272,9 @@ if (!extension_loaded('mysql') && !function_exists('mysql_connect')) { */ function mysql_get_client_info() { - return mysqli_get_client_info(); + global $__MYSQLI_WRAPPER_LINK; + // Better use the reference to current connection + return mysqli_get_client_info($__MYSQLI_WRAPPER_LINK); } /** @@ -281,7 +283,9 @@ if (!extension_loaded('mysql') && !function_exists('mysql_connect')) { */ function mysql_free_result(mysqli_result $result) { - return mysqli_free_result($result); + // mysqli_free_result have a void return + mysqli_free_result($result); + return TRUE; } /** |