Make WordPress Core

Opened 2 weeks ago

Closed 2 weeks ago

#63367 closed defect (bug) (fixed)

Remove unnecessary type casting in wp-links-opml.php

Reported by: dilipbheda's profile dilipbheda Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Feeds Keywords: has-patch
Focuses: coding-standards Cc:

Description

While reviewing the wp-links-opml.php file, I noticed that the $link_cat variable is being cast to (string). However, since the absint function already casts the value to (int), the explicit type casting to (string) seems unnecessary and can be removed.

Change History (3)

This ticket was mentioned in PR #8755 on WordPress/wordpress-develop by @dilipbheda.


2 weeks ago
#1

@umeshsinghin commented on PR #8755:


2 weeks ago
#2

absint() already casts to integer, so extra (string) is useless.
urldecode() is called only once — avoiding waste. (WordPress VIP coding standards and best practices)

Looks good to me

#3 @SergeyBiryukov
2 weeks ago

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

In 60207:

Coding Standards: Remove unnecessary type casting in wp-links-opml.php.

Follow-up to [13747].

Props dilipbheda, debarghyabanerjee, umeshsinghin.
Fixes #63367.

Note: See TracTickets for help on using tickets.