WordPress.org

Make WordPress Core

Opened 8 weeks ago

Last modified 5 weeks ago

#41970 new enhancement

Removed unused variable.

Reported by: adnan.limdi Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Upgrade/Install Keywords: has-patch
Focuses: Cc:

Description

I have found wp_current_db_version variable not use in functions so need to remove this for improvement.
file locations :
https://core.trac.wordpress.org/browser/trunk/src/wp-admin/includes/upgrade.php line no:1596

Attachments (1)

remove-unused-variable.patch (534 bytes) - added by adnan.limdi 8 weeks ago.
Remove Unused variable

Download all attachments as: .zip

Change History (6)

@adnan.limdi
8 weeks ago

Remove Unused variable

#1 follow-up: @adnan.limdi
8 weeks ago

<?php
1625    $comments = $wpdb->get_results(
                "SELECT `comment_ID` FROM `{$wpdb->comments}`
                        WHERE `comment_date_gmt` > '2015-04-26'
                        AND LENGTH( `comment_content` ) >= {$allowed_length}
                        AND ( `comment_content` LIKE '%<%' OR `comment_content` LIKE '%>%' )"
        );

Also I See This here date is define static : WHERE comment_date_gmt > '2015-04-26' so we need to update this for future version.

#2 @adnan.limdi
8 weeks ago

  • Keywords has-patch added

#3 in reply to: ↑ 1 ; follow-up: @SergeyBiryukov
8 weeks ago

  • Component changed from General to Upgrade/Install

Replying to adnan.limdi:

Also I See This here date is define static : WHERE comment_date_gmt > '2015-04-26' so we need to update this for future version.

Thanks for the patch. The unused variable can be removed, but the date is specific to the security fix in [32308], there's no need to update it in a future version.

#4 in reply to: ↑ 3 @adnan.limdi
8 weeks ago

Replying to SergeyBiryukov:

Replying to adnan.limdi:

Also I See This here date is define static : WHERE comment_date_gmt > '2015-04-26' so we need to update this for future version.

Thanks for the patch. The unused variable can be removed, but the date is specific to the security fix in [32308], there's no need to update it in a future version.

ok, @SergeyBiryukov thanks for the response.

Last edited 8 weeks ago by adnan.limdi (previous) (diff)

#5 @adnan.limdi
5 weeks ago

@SergeyBiryukov can you please review it.

Note: See TracTickets for help on using tickets.