[wp-trac] [WordPress Trac] #51629: [php8] TypeError: call_user_func_array(): non-static method WP_Feed_Cache::create() cannot be called statically
WordPress Trac
noreply at wordpress.org
Mon Oct 26 07:55:51 UTC 2020
#51629: [php8] TypeError: call_user_func_array(): non-static method
WP_Feed_Cache::create() cannot be called statically
--------------------------+---------------------
Reporter: bph | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.6
Component: Feeds | Version: trunk
Severity: normal | Resolution:
Keywords: php8 | Focuses:
--------------------------+---------------------
Comment (by ayeshrajans):
In PHP 8.0 [https://php.watch/versions/8.0/non-static-static-call-fatal-
error attempting to call a non-static as static causes fatal error in PHP
8.0]. This was silenced with the `@` operator which suppressed the PHP
warning, but now that it's a type error, it bubbles up to the error
handler.
From what I see, `Cache::create` method is moved to
`SimplePie_Cache::get_handle`. I don't see why we can't rewrite the class
to `SimplePie_Cache`. I will attach a patch, could you give it a try
please? I suppose the fix should be sent to upstream SimplePie project
before we make changes in core, or wait for a fix from the maintainers
upstream.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/51629#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list