summaryrefslogtreecommitdiff
path: root/lib/action.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-02-26 13:36:27 -0800
committerEvan Prodromou <evan@controlyourself.ca>2009-02-26 13:36:27 -0800
commitee92d0b0a8870143ee462b5833b0adf47673a613 (patch)
treeac32fee43bd064da712887f0780b3b0f65b7d95d /lib/action.php
parent2bf5b23016ab4929a1c9197907d4a621bb888742 (diff)
fix notice in action with caching
Diffstat (limited to 'lib/action.php')
-rw-r--r--lib/action.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/action.php b/lib/action.php
index 455ebeff0..f19a047cf 100644
--- a/lib/action.php
+++ b/lib/action.php
@@ -812,11 +812,12 @@ class Action extends HTMLOutputter // lawsuit
}
if ($lm) {
header('Last-Modified: ' . date(DATE_RFC1123, $lm));
- $if_modified_since = $_SERVER['HTTP_IF_MODIFIED_SINCE'];
- if ($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)) {