Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
other
Priority:
Minor
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
16 Aug 2013 at 21:29 UTC
Updated:
29 Jul 2014 at 22:47 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
jlindsey15 commentedLooking at the code:
it doesn't seem like $alias is unused, unless I'm being stupid.
Comment #2
michaelhiiva commented@jlindsey15 Yes after looking at the code:
local variable $alias is not unused.
Comment #3
alexanderpas commentedIt seems like$this->handler->tableAliasesalways gets one value on this line,causing the conditionalif (empty($this->handler->tableAlias))to always return FALSE.as a result, the variable $alias seems to be unused.In addition in the case$this->handler->tableAliasesis empty,$aliasmust be empty too,$aliasis equal to an item in$this->handler->tableAliasesComment #4
michaelhiiva commented@alexanderpas The conditional
if (empty($this->handler->tableAlias))is checking$this->handler->tableAliasnot$this->handler->tableAliases, thusif (empty($this->handler->tableAlias))can return True. I agree if$this->handler->tableAliasesis empty,$aliasmust be empty, meaning$this->handler->tableAlias = $alias;could return empty causing the conditionalif (empty($this->handler->tableAlias))to be insufficient or wrong conditional.Comment #5
joelpittetComment #6
mrded commentedComment #7
mrded commentedI have also changed comment to drupal code standards.
Comment #8
thomas.fleming commentedThe code style looks fine, and the patch applies.
Comment #9
alexpottLet's fix up the comment here too.. No need to start with "And" and we are not longer setting
table_aliasComment #10
mrded commentedComment #11
joelpittetBack to RTBC.
Comment #12
xano10: views-2067529-10.patch queued for re-testing.
Comment #13
xano10: views-2067529-10.patch queued for re-testing.
Comment #14
webchickCommitted and pushed to 8.x. Thanks!