Problem/Motivation

PHPStan identified a few undefined variable errors, currently baselined.

Proposed resolution

Resolve errors, cleanup baseline.

CommentFileSizeAuthor
#2 3316276-2.patch4.01 KBmondrake

Comments

mondrake created an issue. See original summary.

mondrake’s picture

Status: Active » Needs review
StatusFileSize
new4.01 KB

Seems to me just cruft in views code.

Status: Needs review » Needs work

The last submitted patch, 2: 3316276-2.patch, failed testing. View results

mondrake’s picture

Status: Needs work » Needs review

(not so) Random test failure

daffie’s picture

Status: Needs review » Reviewed & tested by the community

All code changes look good to me.
For me it is RTBC.

  • catch committed 330cbd7 on 10.0.x
    Issue #3316276 by mondrake: Fix 'undefined variable' PHPStan L0 errors...
  • catch committed 2170e97 on 10.1.x
    Issue #3316276 by mondrake: Fix 'undefined variable' PHPStan L0 errors
    
catch’s picture

Version: 10.1.x-dev » 10.0.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/pushed to 10.1.x and cherry-picked to 10.0.x, thanks!

Status: Fixed » Closed (fixed)

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

berdir’s picture

Note: The code here wasn't quite as dead as it seemed. It's a copy from the parent:

    if (!empty($def['join_id'])) {
      $id = $def['join_id'];
    }
    else {
      $id = 'standard';
    }

For EntityReverse, $def == $alias as there are two tables, this wasn't adjusted when it was originally copied from the parent. In practice, this never worked and it was never needed to use a different join plugin than standard, so removing it seems fine.

Found this because I was trying to understand the copied code added in #2799479: Views doesn't recognize relationship to host