For a coding standards cleanup, remove unused variables.

Issue fork views-3386717

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

DamienMcKenna created an issue. See original summary.

damienmckenna’s picture

Status: Active » Needs review
StatusFileSize
new26.11 KB

Hopefully this doesn't cause any regressions.

Status: Needs review » Needs work

The last submitted patch, 2: views-n3386717-2.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

urvashi_vora made their first commit to this issue’s fork.

urvashi_vora’s picture

Status: Needs work » Needs review
StatusFileSize
new22.7 KB

Please review.

Thanks

tibezh’s picture

Title: Remove unused keys on foreach loops » Remove unused variables
Issue summary: View changes
StatusFileSize
new59.49 KB

I've changed a little bit the ticket title and description.
Also prepared a patch to remove unused variables in the code. Just code refactoring.
Needs review.

joseph.olstad’s picture

Great work once again @tibezh

joseph.olstad’s picture

Status: Needs review » Reviewed & tested by the community

  • DamienMcKenna committed 0631676b on 7.x-3.x
    Issue #3386717 by urvashi_vora, DamienMcKenna, tibezh, joseph.olstad:...
damienmckenna’s picture

Status: Reviewed & tested by the community » Fixed
Parent issue: » #3347650: Plan for Views 7.x-3.30

Committed. Thanks everyone.

Status: Fixed » Closed (fixed)

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

skylord’s picture

Hm. After this commit views_handler_area_result is broken 'cause all variables referenced later with curly braces syntax were removed....

cboyden’s picture

After this commit, I'm getting out-of-memory errors on an existing view with a contextual filter.

trafo’s picture

In views_plugin_argument_validate_php::validate_argument() removed variables might be used in the actual PHP code that is evaluated with eval(). Like in my case. Would be nice to give at least warning to check that code.

We noticed some regression also with exposed forms, but not sure if it's tight to this.

art4003’s picture

As @trafo mentioned above, we also had some regression with the PHP code eval().

As per the docs:
"... You may change the argument by setting "$handler->argument". You may change the title used for substitutions for this argument by setting "$handler->validated_title"."

We we using the $handler->argument to set/update the argument. After the update this started failing.