Make WordPress Core

Ticket #37339: 0001-call-opcache_invalidate-after-write-configuration.patch

File 0001-call-opcache_invalidate-after-write-configuration.patch, 830 bytes (added by remicollet, 10 years ago)
  • wp-admin/setup-config.php

    From 2982b80bab2b29ee411b779e5bb7d4d5a9e7dfd9 Mon Sep 17 00:00:00 2001
    From: Remi Collet <fedora@famillecollet.com>
    Date: Tue, 12 Jul 2016 12:46:39 +0200
    Subject: [PATCH] call opcache_invalidate after write configuration
    
    ---
     wp-admin/setup-config.php | 3 +++
     1 file changed, 3 insertions(+)
    
    diff --git a/wp-admin/setup-config.php b/wp-admin/setup-config.php
    index 1ad40fc..f0f3703 100644
    a b if ( ! /iPad|iPod|iPhone/.test( navigator.userAgent ) ) { 
    399399                }
    400400                fclose( $handle );
    401401                chmod( $path_to_wp_config, 0666 );
     402                if (function_exists('opcache_invalidate')) {
     403                        opcache_invalidate($path_to_wp_config);
     404                }
    402405                setup_config_display_header();
    403406?>
    404407<h1 class="screen-reader-text"><?php _e( 'Successful database connection' ) ?></h1>