Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
other
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
23 Aug 2013 at 11:46 UTC
Updated:
29 Jul 2014 at 22:48 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
legolasboRemoved the unused variables
Comment #2
phiit commentedThanks for the patch!
Reviewed and this patch looks good, except I think that the declaration of $fields variable at the start of Sql class could be cleaned up? Since after the patch the use (or in this case the unuse) of the variable is removed from the code completely.
Wondering if this chunk could be cleaned up as well? Starting at row 77 after applying the patch:
Comment #3
legolasboAttached patch also removes code chunk mentioned above.
Comment #5
legolasboThe removal of $fields causes exceptions in 3 tests. I'll look into these tests to see if they should also be cleaned up.
Comment #6
phiit commentedI was probably wrong about removing the $fields completely. I think the first patch you did will work fine in this case as it removes the unused variable issue here.
Comment #7
legolasboI agree you could be wrong about removing $fields completely, however I do think we should at least review the failing code to see how $fields is used there. Perhaps it is just legacy code doing stuff with an always empty array.
Comment #8
dawehnerat least $this->fields is 100% used in the class.
Comment #9
legolasboYou are right dawehner, i feel kinda stupid for not looking for $this->fields.
I've attached a reroll of the original patch to be reviewed once again.
Comment #10
dawehnerThis change looks odd but these variables are indeed not needed.
Comment #11
webchickCommitted and pushed to 8.x. Thanks!