Permalink
Browse files

Helps if we generate the Expires date before trying to use it, just i…

…n case there are no posts on the page.
  • Loading branch information...
1 parent c0bc556 commit 4c7764f728bd2461c649a04ad6b30012f08f4b3c @chrismeller committed Nov 24, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 classes/theme.php
View
@@ -342,7 +342,6 @@ public function act_display( $paramarray = array( 'user_filters'=> array() ) )
if ( isset( $post ) ) {
$last_modified = $post->modified->set_timezone( 'UTC' )->format( 'D, d M Y H:i:s e' );
- $expires = HabariDateTime::date_create( '30 days' )->set_timezone( 'UTC' )->format( 'D, d M Y H:i:s e' );
header('Last-Modified: ' . $last_modified, true);
@@ -358,6 +357,7 @@ public function act_display( $paramarray = array( 'user_filters'=> array() ) )
}
+ $expires = HabariDateTime::date_create( '30 days' )->set_timezone( 'UTC' )->format( 'D, d M Y H:i:s e' );
header('Expires: ' . $expires, true);
return $this->display_fallback( $fallback );

0 comments on commit 4c7764f

Please sign in to comment.