diff options
author | Swen van Zanten <info@hdsign.nl> | 2016-10-03 21:14:41 +0200 |
---|---|---|
committer | Davey Shafik <davey@php.net> | 2016-10-03 12:14:41 -0700 |
commit | efaec4da0ef401bcda83caffbb771228b2b88860 (patch) | |
tree | 44c99296eaec3d753921622a3c21f4b2caf9e873 /lib/mysql.php | |
parent | b1edab9eaffa1c2abcc3541a2304e679e5b8c90f (diff) | |
download | php7-mysql-shim-efaec4da0ef401bcda83caffbb771228b2b88860.zip php7-mysql-shim-efaec4da0ef401bcda83caffbb771228b2b88860.tar.gz php7-mysql-shim-efaec4da0ef401bcda83caffbb771228b2b88860.tar.bz2 |
Added the result type to the mysql_fetch_array function (#16)
* Added the result type to the mysql_fetch_array function
* Changed the 'resultType' variable to camelCase, added extra tests
* Fixed the mysql_fetch tests
Diffstat (limited to 'lib/mysql.php')
-rw-r--r-- | lib/mysql.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/mysql.php b/lib/mysql.php index 21d625b..e3352a4 100644 --- a/lib/mysql.php +++ b/lib/mysql.php @@ -313,14 +313,14 @@ namespace { return mysqli_fetch_row($result) ?: false; } - function mysql_fetch_array($result) + function mysql_fetch_array($result, $resultType = MYSQL_BOTH) { if (\Dshafik\MySQL::checkValidResult($result, __FUNCTION__)) { // @codeCoverageIgnoreStart return false; // @codeCoverageIgnoreEnd } - return mysqli_fetch_array($result) ?: false; + return mysqli_fetch_array($result, $resultType) ?: false; } function mysql_fetch_assoc($result) /* : array|null */ |