diff options
| author | Damien Regad <dregad@mantisbt.org> | 2022-06-29 17:56:41 +0200 |
|---|---|---|
| committer | Damien Regad <dregad@mantisbt.org> | 2022-06-29 17:56:41 +0200 |
| commit | 906e84260552b014a14e8f4667335f7d8ae896e4 (patch) | |
| tree | c3c3c0f1129d63ad00f25c14a371e825dc03e36a /adodb-lib.inc.php | |
| parent | 996d27ad7ee5b7a80fb1a3ad7732064a1e17e9fe (diff) | |
| download | adodb-906e84260552b014a14e8f4667335f7d8ae896e4.tar.gz adodb-906e84260552b014a14e8f4667335f7d8ae896e4.tar.bz2 adodb-906e84260552b014a14e8f4667335f7d8ae896e4.zip | |
Fix GetUpdateSQL() causing deprecated warning
PHP 8.1 throws a warning when compared field value is null. Fixed by
replacing strcmp() with a strict-comparison operator.
Fixes #844
Diffstat (limited to 'adodb-lib.inc.php')
| -rw-r--r-- | adodb-lib.inc.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/adodb-lib.inc.php b/adodb-lib.inc.php index ced5e126..0cfc3ab8 100644 --- a/adodb-lib.inc.php +++ b/adodb-lib.inc.php @@ -750,7 +750,7 @@ function _adodb_getupdatesql(&$zthis, &$rs, $arrFields, $forceUpdate=false, $for else if (isset($rs->fields[strtolower($upperfname)])) $val = $rs->fields[strtolower($upperfname)]; else $val = ''; - if ($forceUpdate || strcmp($val, $arrFields[$upperfname])) { + if ($forceUpdate || $val !== $arrFields[$upperfname]) { // Set the counter for the number of fields that will be updated. $fieldUpdatedCount++; |
