User tests: Successful: Unsuccessful:
Fixes an issue, when updateObject is used for updating a row in a table based on an object's properties..
Specifically the problem is when null is used in the WHERE
clause (not to be confused with NULL
's being updated).
Not sure if any needed. It should not change behavior (except not being a wrong query ;) ).
Try this:
Create a table:
CREATE TABLE test
(
id INT(11) PRIMARY KEY NOT NULL,
value VARCHAR(255)
);
INSERT INTO `test` (`id`, `value`) VALUES (NULL, NULL), (NULL, 'test');
SELECT * FROM `test` WHERE value = null;
Notice that the correct row is not returned;
SELECT * FROM `test` WHERE value is null;
Notice that the row with the NULL value is returned.
Also before this specific change, the quote function would essentially write the query as such:
SELECT * FROM `test` WHERE value = '';
... which is also wrong
None.
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
Labels |
Added:
?
|
I have tested this item
Code review.
Status | Pending | ⇒ | Ready to Commit |
RTC after two successful tests.
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-06-13 13:37:49 |
Closed_By | ⇒ | rdeutz | |
Labels |
Added:
?
|
I have tested this item✅ successfully on 281ac00
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/13733.