Opened 3 months ago
Last modified 3 months ago
#63201 new defect (bug)
FTPext Stub
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 6.9 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Filesystem API | Keywords: | dev-feedback has-patch |
Focuses: | docs | Cc: |
Description
Healthiness stub for FTPext
Change History (5)
This ticket was mentioned in PR #8622 on WordPress/wordpress-develop by @SirLouen.
3 months ago
#1
- Keywords has-patch added
This ticket was mentioned in Slack in #core by sirlouen. View the logs.
3 months ago
#3
@
3 months ago
- Version trunk deleted
"to fix a disturbing type error" could you please add some details about the type error reported?
#4
@
3 months ago
@audrasjb as It's just a stubs issue
This file was updated some months ago, according to the new PHP 8.1 standard, to use FTP/Connection, instead of resource.
But someone forgot to update the docs $link type when they introduce the update.
So when you use any type of code parser with anything over PHP 8.1, you will see the code plagued with typing errors like: $this->link
is not a resource but a FTP/Connection
I've kept resource
for anything below PHP 8.1 compatibility (and because the current $link
instantiation is still using the resource mode).
You can check the errors with any parser that use the wordpress stubs, intellisense, phpstan...
A simple patch to fix a disturbing type error for stubs