[wp-meta] [Making WordPress.org] #6425: In wordpress.org, the photo-directory plugin has PHPCS error.

Making WordPress.org noreply at wordpress.org
Mon Nov 14 19:43:52 UTC 2022


#6425: In wordpress.org, the photo-directory plugin has PHPCS error.
-------------------------------------+----------------------
 Reporter:  smit08                   |       Owner:  (none)
     Type:  defect (bug)             |      Status:  closed
 Priority:  normal                   |   Milestone:
Component:  Photo Directory          |  Resolution:  invalid
 Keywords:  has-patch needs-testing  |
-------------------------------------+----------------------
Changes (by coffee2code):

 * status:  new => closed
 * resolution:   => invalid
 * component:  General => Photo Directory


Comment:

 Thanks for the report @smit08! A few things, however:

 1. The code in question is a vendor library required and utilized by the
 two Google libraries used by the Photo Directory. We do not control the
 code, nor would we want to maintain a fork of it (without their being a
 compelling reason to do so). At the moment, if this is a bug it hasn't
 been triggered thus far. The grpc/grpc package [https://github.com/grpc
 /grpc-php/blob/master/src/lib/RpcServer.php#L75 still has this line of
 code]. If you think this is a legitimate bug, then I recommend reporting
 it to the maintainers. This would fix things more widely and save us from
 having to maintain local changes to the library.

 2. The class containing the code in question is [https://github.com/grpc
 /grpc-php/blob/master/src/lib/RpcServer.php#L23 marked as experimental]
 and is not actually being used by either of those Google libraries or any
 other dependency, so we aren't affected by it.

 3. While I don't question that the scan you performed flagged that
 `continue` as being used outside of a loop, but having looked at the code
 it seems to me the `continue` is indeed within a `while` loop, which is
 perfectly valid. In the code, if a request is not implemented, it simply
 `continue`s to the next (infinite) `while` loop iteration, basically
 waiting for the next event.

 This seems like maybe it was a false positive reported by the scanning
 tool?

-- 
Ticket URL: <https://meta.trac.wordpress.org/ticket/6425#comment:3>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org


More information about the wp-meta mailing list