Bug #53662
DatabaseConnection INSERTquery does not allow NULL values
Status: | Resolved | Start date: | 2013-11-15 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | - | % Done: | 100% |
|
Category: | DataHandler aka TCEmain | Spent time: | - | |
Target version: | - | |||
TYPO3 Version: | 6.2 | Is Regression: | No | |
PHP Version: | 5.4 | Sprint Focus: | ||
Complexity: | no-brainer |
Description
When you create a new record that has input
fields with the new eval
NULL
setting the value is set correctly to NULL
in the DataHandler
but it is inserted as an empty string in the database.
The reason for this is, that the INSERTQuery()
method in the DatabaseConnection
class does not supply the $allowNull
parameter to the fullQuoteArray()
method. The UPDATEquery()
method already does this so this can also be enabled for INSERTQuery()
.
Related issues
Associated revisions
[BUGFIX] Allow NULL values in INSERT queries
Currently only UPDATE queries pass the $allowNull parameter to the
fullQuoteStr() method in the DatabaseHandler. To make the behavior of
both methods consistent and to allow NULL values during creation of
new records by TCEmain the $allowNull parameter is also set to TRUE for
INSERT queries.
Resolves: #53662
Releases: 6.2, 6.1, 6.0
Change-Id: I066b9880a557b6c9058fc15f467631f1313300f9
Reviewed-on: https://review.typo3.org/25422
Reviewed-by: Philipp Gampe
Reviewed-by: Frans Saris
Tested-by: Frans Saris
Reviewed-by: Xavier Perseguers
Reviewed-by: Markus Klein
Tested-by: Markus Klein
[BUGFIX] Allow NULL values in INSERT queries
Currently only UPDATE queries pass the $allowNull parameter to the
fullQuoteStr() method in the DatabaseHandler. To make the behavior of
both methods consistent and to allow NULL values during creation of
new records by TCEmain the $allowNull parameter is also set to TRUE for
INSERT queries.
Resolves: #53662
Releases: 6.2, 6.1, 6.0
Change-Id: I066b9880a557b6c9058fc15f467631f1313300f9
Reviewed-on: https://review.typo3.org/26638
Reviewed-by: Markus Klein
Tested-by: Markus Klein
[BUGFIX] Allow NULL values in INSERT queries
Currently only UPDATE queries pass the $allowNull parameter to the
fullQuoteStr() method in the DatabaseHandler. To make the behavior of
both methods consistent and to allow NULL values during creation of
new records by TCEmain the $allowNull parameter is also set to TRUE for
INSERT queries.
Resolves: #53662
Releases: 6.2, 6.1, 6.0
Change-Id: I066b9880a557b6c9058fc15f467631f1313300f9
Reviewed-on: https://review.typo3.org/26644
Reviewed-by: Markus Klein
Tested-by: Markus Klein
History
#1 Updated by Gerrit Code Review over 1 year ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/25422
#2 Updated by Markus Klein over 1 year ago
Indeed a forgotten thing.
#3 Updated by Gerrit Code Review over 1 year ago
Patch set 1 for branch TYPO3_6-1 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26638
#4 Updated by Steffen Ritter over 1 year ago
POST merge review done; OK
#5 Updated by Alexander Stehlik over 1 year ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 8207a2bb3ffa3b0dbdac402955487ab4decab9d7.
#6 Updated by Gerrit Code Review over 1 year ago
- Status changed from Resolved to Under Review
Patch set 1 for branch TYPO3_6-0 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26644
#7 Updated by Alexander Stehlik over 1 year ago
- Status changed from Under Review to Resolved
Applied in changeset 2c40d1b1621c0bb50da301bab82de98279ff250b.