Make WordPress Core

Opened 9 years ago

Closed 7 years ago

Last modified 7 years ago

#41970 closed enhancement (fixed)

Removed unused variable.

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

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 9 years ago.
Remove Unused variable

Download all attachments as: .zip

Change History (10)

#1 follow-up: @adnan.limdi
9 years 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
9 years ago

  • Keywords has-patch added

#3 in reply to: ↑ 1 ; follow-up: @SergeyBiryukov
9 years ago

  • Component General → 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
9 years 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 9 years ago by adnan.limdi (previous) (diff)

#5 @adnan.limdi
9 years ago

@SergeyBiryukov can you please review it.

#6 @adnan.limdi
7 years ago

@SergeyBiryukov can you close this tickit if it's sloved

This ticket was mentioned in ​Slack in #core by testiflair. ​View the logs.


7 years ago

#8 @SergeyBiryukov
7 years ago

  • Owner set to SergeyBiryukov
  • Resolution → fixed
  • Status new → closed

In 46972:

Upgrade/Install: Remove unused global in upgrade_430_fix_comments().

Props adnan.limdi.
Fixes #41970.

#9 @SergeyBiryukov
7 years ago

  • Milestone Awaiting Review → 5.4
Note: See TracTickets for help on using tickets.