From f9ad99009144095ce4c98e04b4898b367995aa8c Mon Sep 17 00:00:00 2001
From: Rob Loach <robloach@gmail.com>
Date: Wed, 15 Jun 2016 13:04:19 -0400
Subject: [PATCH] Issue #2639878 by omega8cc, RobLoach: Use less demanding
 check to see if OPcache is active

---
 core/install.php                   | 2 +-
 core/modules/system/system.install | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/core/install.php b/core/install.php
index 50deb38..215378a 100644
--- a/core/install.php
+++ b/core/install.php
@@ -28,7 +28,7 @@
   exit;
 }
 
-if (function_exists('opcache_get_status') && opcache_get_status()['opcache_enabled'] && !ini_get('opcache.save_comments')) {
+if (function_exists('opcache_invalidate') && ini_get('opcache.enable') && !ini_get('opcache.save_comments')) {
   print 'Systems with OPcache installed must have <a href="http://php.net/manual/en/opcache.configuration.php#ini.opcache.save-comments">opcache.save_comments</a> enabled.';
   exit();
 }
diff --git a/core/modules/system/system.install b/core/modules/system/system.install
index cdaeba6..f3d1bce 100644
--- a/core/modules/system/system.install
+++ b/core/modules/system/system.install
@@ -242,7 +242,7 @@ function system_requirements($phase) {
 
   if ($phase == 'install' || $phase == 'runtime') {
     // Check to see if OPcache is installed.
-    $opcache_enabled = (function_exists('opcache_get_status') && opcache_get_status()['opcache_enabled']);
+    $opcache_enabled = (function_exists('opcache_invalidate') && ini_get('opcache.enable'));
     if (!$opcache_enabled) {
       $requirements['php_opcache'] = array(
         'value' => t('Not enabled'),
