summaryrefslogtreecommitdiffstats
path: root/lib/mysql.php
diff options
context:
space:
mode:
authorDavey Shafik <davey@php.net>2016-07-03 19:59:15 -0700
committerGitHub <noreply@github.com>2016-07-03 19:59:15 -0700
commite198b75ff3a9dc9644d7ab3bed1032944e7063cb (patch)
tree5fa0298bc0eee5f423e52dcb5ac98c466341e652 /lib/mysql.php
parent36faf77db440bce329ffe214ffd923723e8d5f23 (diff)
parent8d0ab9ef1ca8fc40e401ae5e6615507fca93cf43 (diff)
downloadphp7-mysql-shim-e198b75ff3a9dc9644d7ab3bed1032944e7063cb.zip
php7-mysql-shim-e198b75ff3a9dc9644d7ab3bed1032944e7063cb.tar.gz
php7-mysql-shim-e198b75ff3a9dc9644d7ab3bed1032944e7063cb.tar.bz2
Merge pull request #8 from gharlan/patch-1
use array_key_exists() instead of isset() because value can be null
Diffstat (limited to 'lib/mysql.php')
-rw-r--r--lib/mysql.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/mysql.php b/lib/mysql.php
index 0d5a66b..b169f1a 100644
--- a/lib/mysql.php
+++ b/lib/mysql.php
@@ -247,7 +247,7 @@ namespace {
}
$row = mysql_fetch_array($result);
- if ($found && isset($row[$field])) {
+ if ($found && array_key_exists($field, $row)) {
return $row[$field];
}