#6425 closed defect (bug) (invalid)
In wordpress.org, the photo-directory plugin has PHPCS error.
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | Photo Directory | Keywords: | has-patch needs-testing |
Cc: |
Description
Path: trunk/wordpress.org/public_html/wp-content/plugins/photo-directory/vendor/grpc/grpc/src/lib/RpcServer.php
while scanning the PHPCS 8.0 compatibility of meta sites and plugins, I found the photo-directory plugin, there is a PHPCS error.
Error: Using 'continue' outside of a loop or switch structure is invalid and will throw a fatal error since PHP 7.0
Attachments (1)
Change History (5)
#3
@
2 years ago
- Component changed from General to Photo Directory
- Resolution set to invalid
- Status changed from new to closed
Thanks for the report @smit08! A few things, however:
- 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 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.
- The class containing the code in question is 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.
- 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 thecontinue
is indeed within awhile
loop, which is perfectly valid. In the code, if a request is not implemented, it simplycontinue
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?
Note: See
TracTickets for help on using
tickets.
Great findings