Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaurício Meneghini Fauth <mauricio@fauth.dev>2022-08-19 06:31:22 +0300
committerMaurício Meneghini Fauth <mauricio@fauth.dev>2022-08-19 06:31:22 +0300
commit0b2ab57ea22b0386782bd87c433220e2856971e6 (patch)
tree7a1276e862dc6c7204ccfa2b66bcbe429cc111b3
parenta2ef27823e27b612eaabda3e134692a5e5929220 (diff)
parent9c3ce37491a20e06e582aa1c67b4480b5cd9aff2 (diff)
Merge branch 'QA_5_2'
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
-rw-r--r--libraries/classes/InsertEdit.php1
-rw-r--r--psalm-baseline.xml4
-rw-r--r--test/classes/InsertEditTest.php24
3 files changed, 26 insertions, 3 deletions
diff --git a/libraries/classes/InsertEdit.php b/libraries/classes/InsertEdit.php
index 26b16c1856..f73d022612 100644
--- a/libraries/classes/InsertEdit.php
+++ b/libraries/classes/InsertEdit.php
@@ -1663,6 +1663,7 @@ class InsertEdit
. ' = ' . $currentValueAsAnArray;
} elseif (
! (empty($multiEditFuncs[$key])
+ && empty($multiEditColumnsNull[$key])
&& isset($multiEditColumnsPrev[$key])
&& $currentValue === $multiEditColumnsPrev[$key])
&& $currentValueAsAnArray !== ''
diff --git a/psalm-baseline.xml b/psalm-baseline.xml
index 95ec8744f3..43f54debce 100644
--- a/psalm-baseline.xml
+++ b/psalm-baseline.xml
@@ -3283,9 +3283,7 @@
<code>$_POST['field_transformation'][$fieldindex]</code>
<code>$_POST['field_transformation_options'][$fieldindex]</code>
</MixedArrayAccess>
- <MixedAssignment occurrences="3">
- <code>$GLOBALS['num_fields']</code>
- <code>$GLOBALS['result']</code>
+ <MixedAssignment occurrences="1">
<code>$mimetype</code>
</MixedAssignment>
</file>
diff --git a/test/classes/InsertEditTest.php b/test/classes/InsertEditTest.php
index af43d48400..06049ad39a 100644
--- a/test/classes/InsertEditTest.php
+++ b/test/classes/InsertEditTest.php
@@ -2217,6 +2217,30 @@ class InsertEditTest extends AbstractTestCase
],
$result
);
+
+ // Test to see if a field can be set to NULL
+ $result = $this->insertEdit->getQueryValuesForInsertAndUpdateInMultipleEdit(
+ $multi_edit_columns_name,
+ ['on'],
+ '',
+ [''],
+ [],
+ false,
+ [],
+ [],
+ 'NULL',
+ [],
+ '0',
+ []
+ );
+
+ $this->assertEquals(
+ [
+ ['`fld` = NULL'],
+ [],
+ ],
+ $result
+ );
}
/**