]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/action.php
Merge branch '0.7.x' into 0.8.x
[quix0rs-gnu-social.git] / lib / action.php
index 975c2bfcb8a23adb01c4ec7dbeb479119547479c..5020b92b0936a129901178015002e9c60179b3a1 100644 (file)
@@ -801,10 +801,12 @@ class Action extends HTMLOutputter // lawsuit
         }
         if ($lm) {
             header('Last-Modified: ' . date(DATE_RFC1123, $lm));
-            if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE'])) {
-                $ims = strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']);
+            if (array_key_exists('HTTP_IF_MODIFIED_SINCE', $_SERVER)) {
+                $if_modified_since = $_SERVER['HTTP_IF_MODIFIED_SINCE'];
+                $ims = strtotime($if_modified_since);
                 if ($lm <= $ims) {
-                    $if_none_match = $_SERVER['HTTP_IF_NONE_MATCH'];
+                    $if_none_match = (array_key_exists('HTTP_IF_NONE_MATCH', $_SERVER)) ?
+                      $_SERVER['HTTP_IF_NONE_MATCH'] : null;
                     if (!$if_none_match ||
                         !$etag ||
                         $this->_hasEtag($etag, $if_none_match)) {