summaryrefslogtreecommitdiff
path: root/adodb-lib.inc.php
diff options
context:
space:
mode:
authorMark Newnham <mark@newnhams.com>2020-01-05 19:49:40 -0700
committerMark Newnham <mark@newnhams.com>2020-01-05 19:49:40 -0700
commit9f026d00040582cfc48de633aa65325678b37935 (patch)
tree71c5afff36921c95a2be50323c5ef8ec76d67242 /adodb-lib.inc.php
parent5089ae0f260be6ebb110118674ac1b687562b364 (diff)
downloadadodb-9f026d00040582cfc48de633aa65325678b37935.tar.gz
adodb-9f026d00040582cfc48de633aa65325678b37935.tar.bz2
adodb-9f026d00040582cfc48de633aa65325678b37935.zip
Replace call to _array_change_key_case see #587
Diffstat (limited to 'adodb-lib.inc.php')
-rw-r--r--adodb-lib.inc.php20
1 files changed, 4 insertions, 16 deletions
diff --git a/adodb-lib.inc.php b/adodb-lib.inc.php
index cfe7f0e2..500bf0fd 100644
--- a/adodb-lib.inc.php
+++ b/adodb-lib.inc.php
@@ -124,20 +124,6 @@ function adodb_transpose(&$arr, &$newarr, &$hdr, &$fobjs)
}
}
-// Force key to upper.
-// See also http://www.php.net/manual/en/function.array-change-key-case.php
-function _array_change_key_case($an_array)
-{
- if (is_array($an_array)) {
- $new_array = array();
- foreach($an_array as $key=>$value)
- $new_array[strtoupper($key)] = $value;
-
- return $new_array;
- }
-
- return $an_array;
-}
function _adodb_replace(&$zthis, $table, $fieldArray, $keyCol, $autoQuote, $has_autoinc)
{
@@ -654,7 +640,8 @@ function _adodb_getupdatesql(&$zthis,&$rs, $arrFields,$forceUpdate=false,$magicq
}
$fieldUpdatedCount = 0;
- $arrFields = _array_change_key_case($arrFields);
+ if (is_array($arrFields))
+ $arrFields = array_change_key_case($arrFields,CASE_UPPER);
$hasnumeric = isset($rs->fields[0]);
$setFields = '';
@@ -836,7 +823,8 @@ static $cacheCols;
$values = '';
$fields = '';
$recordSet = null;
- $arrFields = _array_change_key_case($arrFields);
+ if (is_array($arrFields))
+ $arrFields = array_change_key_case($arrFields,CASE_UPPER);
$fieldInsertedCount = 0;
if (is_string($rs)) {