? ? Pending

User tests: Successful: Unsuccessful:

avatar frankmayer
frankmayer
24 Jan 2017

Summary of Changes

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).

Testing Instructions

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

Documentation Changes Required

None.

avatar frankmayer frankmayer - open - 24 Jan 2017
avatar frankmayer frankmayer - change - 24 Jan 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 24 Jan 2017
Category Libraries
avatar frankmayer frankmayer - change - 24 Jan 2017
The description was changed
avatar frankmayer frankmayer - edited - 24 Jan 2017
avatar rdeutz rdeutz - change - 27 May 2017
Labels Added: ?
avatar andrepereiradasilva
andrepereiradasilva - comment - 12 Jun 2017

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.

avatar andrepereiradasilva andrepereiradasilva - test_item - 12 Jun 2017 - Tested successfully
avatar Quy
Quy - comment - 12 Jun 2017

I have tested this item successfully on 281ac00

Code review.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/13733.

avatar Quy Quy - test_item - 12 Jun 2017 - Tested successfully
avatar franz-wohlkoenig franz-wohlkoenig - change - 13 Jun 2017
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 13 Jun 2017

RTC after two successful tests.

avatar rdeutz rdeutz - change - 13 Jun 2017
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: ?
avatar rdeutz rdeutz - close - 13 Jun 2017
avatar rdeutz rdeutz - merge - 13 Jun 2017

Add a Comment

Login with GitHub to post a comment