summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSwen van Zanten <info@hdsign.nl>2016-10-03 21:14:41 +0200
committerDavey Shafik <davey@php.net>2016-10-03 12:14:41 -0700
commitefaec4da0ef401bcda83caffbb771228b2b88860 (patch)
tree44c99296eaec3d753921622a3c21f4b2caf9e873 /lib
parentb1edab9eaffa1c2abcc3541a2304e679e5b8c90f (diff)
downloadphp7-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')
-rw-r--r--lib/mysql.php4
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 */