[wp-trac] [WordPress Trac] #36455: Call opcache_reset() after plug-in, theme or core update
WordPress Trac
noreply at wordpress.org
Thu Apr 12 20:05:45 UTC 2018
#36455: Call opcache_reset() after plug-in, theme or core update
-------------------------------------+---------------------
Reporter: nigro.simone | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: 5.0
Component: Upgrade/Install | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-testing | Focuses:
-------------------------------------+---------------------
Comment (by benoitchantre):
Replying to [comment:41 GregLone]:
> Hi there,
>
> You'll get a fatal error with php < 5.5 because of `empty()`:
> {{{#!php
> if ( ! empty( ini_get( 'opcache.restrict_api' ) ) && strpos( __FILE__,
ini_get( 'opcache.restrict_api' ) ) !== 0 ) {
> return;
> }
> }}}
> Should be:
> {{{#!php
> $restrict_api = ini_get( 'opcache.restrict_api' );
>
> if ( $restrict_api && strpos( __FILE__, $restrict_api ) !== 0 ) {
> return;
> }
> }}}
Before this test, there's a guard clause that check for the existence of
opcache_reset() (since PHP 5.5).
There should be no error with PHP < 5.5 because opcache_reset() doesn't
exist in these versions and the function will return early.
Did you experiment a fatal error?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36455#comment:42>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list