Making WordPress.org

Opened 2 years ago

Closed 4 months ago

#7691 closed defect (bug) (maybelater)

Strict comparison operator missing with post get_post_type() check

Reported by: deepakrohilla Owned by:
Priority: lowest Milestone:
Component: Jobs (jobs.wordpress.net) Keywords: has-patch
Cc:

Description

Strict check missing in post type check in jobswp theme.
it should be <?php if ( 'post' === get_post_type() ) : ?> but currently it is <?php if ( 'post' == get_post_type() ) : ?>

Attachments (1)

job.PNG​ (36.9 KB ) - added by deepakrohilla 2 years ago.

Download all attachments as: .zip

Change History (5)

This ticket was mentioned in ​PR #339 on ​WordPress/wordpress.org by ​@deepakrohilla.


2 years ago
#1

  • Keywords has-patch added

#2 @dd32
2 years ago

  • Priority high → lowest

Strict checks are not always required, loose comparisons are often better in non-security scenarios. Marking as low-priority.

​@obenland commented on ​PR #339:


4 months ago
#3

There are a vast amount of code quality fixes that can be done across the meta repository. I'm not sure selected patches like this are the best way solve them. These should rather be updates as part of regular work or in a coordinated effort like it was done in Core.

#4 @obenland
4 months ago

  • Resolution → maybelater
  • Status new → closed
Note: See TracTickets for help on using tickets.