WordPress.org

Making WordPress.org

Opened 2 years ago

Closed 2 years ago

#3138 closed enhancement (fixed)

Variable not used anywhere in this functions.

Reported by: adnan.limdi Owned by: obenland
Milestone: Priority: normal
Component: API Keywords: has-patch
Cc:

Description

here I check get_location() functions i found $cache_life, $cache_group; varible not used anyware inside this functions so can u please imporve it.

Attachments (1)

wordpress-org-site-3138.patch (440 bytes) - added by adnan.limdi 2 years ago.
above attachment is wrong so please not consider it.get the warning as "unused variable".

Download all attachments as: .zip

Change History (5)

@adnan.limdi
2 years ago

above attachment is wrong so please not consider it.get the warning as "unused variable".

#1 @SergeyBiryukov
2 years ago

  • Component changed from General to API

#2 @Otto42
2 years ago

Thank you for the patch and such, however, I haven't the faintest idea what this patch refers to. It just says index.php. You don't say where this file is, what it is for, what this function does..

You need to actually explain things in a ticket, so that others can understand what you're talking about, exactly. As it is, this says that there's some unused variables somewhere, in an index.php file, on some random site, somewhere in the world. I'm sure that is the case, however, with this little amount of detail, there's not a lot that can done about it.

#3 @adnan.limdi
2 years ago

@Otto42 Thanks for a response here.

This file locations : https://meta.trac.wordpress.org/browser/sites/trunk/api.wordpress.org/public_html/events/1.0/index.php
line no 474.

Here get_location functions which is used for Determine a location for the given parameters.i found this two variable are not use in get_location functions but it is define so this two variable(global $cache_life, $cache_group;) are not use here so we can remove this two global variable for imporvement.

Last edited 2 years ago by adnan.limdi (previous) (diff)

#4 @obenland
2 years ago

  • Owner set to obenland
  • Resolution set to fixed
  • Status changed from new to closed

In 6291:

Events: Remove unused globals.

Props adnan.limdi.
Fixes #3138.

Note: See TracTickets for help on using tickets.