[wp-trac] [WordPress Trac] #36455: Call opcache_reset() after plug-in, theme or core update

WordPress Trac noreply at wordpress.org
Thu Apr 12 17:08:02 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 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;
 }
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/36455#comment:41>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list