diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc
index 867a375..0600f9a 100644
--- a/core/includes/bootstrap.inc
+++ b/core/includes/bootstrap.inc
@@ -1213,8 +1213,8 @@ function drupal_serve_page_from_cache(stdClass $cache, Response $response, Reque
   // First half: we must determine if we should be returning a 304.
 
   // Negotiate whether to use compression.
-  $page_compression = !empty($cache->data['page_compressed']) && extension_loaded('zlib');
-  $return_compressed = $page_compression && $request->server->has('HTTP_ACCEPT_ENCODING') && strpos($request->server->get('HTTP_ACCEPT_ENCODING'), 'gzip') !== FALSE;
+  $page_compressed = !empty($cache->data['page_compressed']);
+  $return_compressed = $page_compressed && $request->server->has('HTTP_ACCEPT_ENCODING') && strpos($request->server->get('HTTP_ACCEPT_ENCODING'), 'gzip') !== FALSE;
 
   // Get headers. Keys are lower-case.
   $boot_headers = drupal_get_http_header();
@@ -1277,7 +1277,7 @@ function drupal_serve_page_from_cache(stdClass $cache, Response $response, Reque
     $response->setVary('Cookie', FALSE);
   }
 
-  if ($page_compression) {
+  if ($page_compressed) {
     $response->setVary('accept-encoding', FALSE);
     // If page_compression is enabled, the cache contains gzipped data.
     if ($return_compressed) {
@@ -1289,7 +1289,14 @@ function drupal_serve_page_from_cache(stdClass $cache, Response $response, Reque
     else {
       // The client does not support compression, so unzip the data in the
       // cache. Strip the gzip header and run uncompress.
-      $cache->data['body'] = gzinflate(substr(substr($cache->data['body'], 10), 0, -8));
+      if (extension_loaded('zlib')) {
+        $cache->data['body'] = gzinflate(substr(substr($cache->data['body'], 10), 0, -8));
+      }
+      else {
+        // Cache data was compressed but no way to uncompress it.
+        // @todo Throw exception or send empty?
+        $cache->date['body'] = '';
+      }
     }
   }
 
