In system.admin.inc line 239, there's a completely useless if condition with an OR operation on three variables encapsulating three other ifs, each one doing checking one of those three variables.

This encapsulating if is totally useless and should be removed.

The attached patch solves that problem.

Beta phase evaluation

Reference: https://www.drupal.org/core/beta-changes
Issue category Task because it cleans things up
Issue priority Minor because removes redundancy
CommentFileSizeAuthor
remove_useless_if.patch1.8 KBdrupa11y

Comments

dawehner’s picture

Assigned: drupa11y » Unassigned
Status: Needs review » Reviewed & tested by the community
Issue tags: +Quickfix

Perfect!

cilefen’s picture

Issue tags: +Needs beta evaluation
joelpittet’s picture

Category: Bug report » Task
Issue summary: View changes
Issue tags: -Needs beta evaluation
webchick’s picture

Status: Reviewed & tested by the community » Fixed

That is indeed quite silly. :) Nice catch.

Committed and pushed to 8.0.x. Thanks!

  • webchick committed 6ff057c on 8.0.x
    Issue #2543546 by mori: Remove useless if in system.admin.inc
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.