Download & Extend

The admin_tasks variable is initialized twice

Project:Drupal core
Version:7.x-dev
Component:system.module
Category:bug report
Priority:minor
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

In the system_get_module_admin_tasks() function of system.module, $admin_tasks is initialized twice, first at about line 1344 and second at about line 1358. Nothing is done with the variable between the two initializations, so it's not a big deal, just unnecessary.

The attached patch eliminates the second one (and adds a blank line where it was, visually separating the two processes).

AttachmentSizeStatusTest resultOperations
system_get_module_admin_tasks.patch611 bytesIgnored: Check issue status.NoneNone

Comments

#1

Version:7.x-dev» 6.x-dev
Priority:minor» critical

how we use imagefield module for drupal6

#2

Version:6.x-dev» 7.x-dev
Priority:critical» minor

@drupalgeek: that's not the place to ask a question like this. Please see http://drupal.org/support

#3

Status:active» needs review

Patch still applies against CVS/HEAD.

#4

Title:The admin_tasks variable is initialized twice . . .» The admin_tasks variable is initialized twice

#5

Here's a revised patch that moves some variable initialization around so they're grouped together and make more sense.

AttachmentSizeStatusTest resultOperations
245544.admin_tasks.patch1.01 KBIgnored: Check issue status.NoneNone

#6

@Dave Reid: your patch adds a line with only two spaces in it. I've attached one that fixes that.

AttachmentSizeStatusTest resultOperations
system_get_module_admin_tasks_2.patch1.01 KBIgnored: Check issue status.NoneNone

#7

Status:needs review» reviewed & tested by the community

Good catch oadaeh! Patch applies cleanly, passes and RTBC.

#8

Status:reviewed & tested by the community» fixed

Good catch. Committed to CVS HEAD. Thanks folks!

#9

Status:fixed» closed (fixed)

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

nobody click here