Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions advanced-cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class batcache {
var $genlock = false;
var $do = false;

function batcache( $settings ) {
function __construct( $settings ) {
if ( is_array( $settings ) ) foreach ( $settings as $k => $v )
$this->$k = $v;
}
Expand Down Expand Up @@ -338,7 +338,7 @@ function add_debug_html_to_output( $debug_html ) {
return;

// Never batcache a POST request.
if ( ! empty( $GLOBALS['HTTP_RAW_POST_DATA'] ) || ! empty( $_POST ) ||
if ( ! empty( file_get_contents("php://input") ) || ! empty( $_POST ) ||
( isset( $_SERVER['REQUEST_METHOD'] ) && 'POST' === $_SERVER['REQUEST_METHOD'] ) )
{
return;
Expand Down Expand Up @@ -543,4 +543,3 @@ function add_debug_html_to_output( $debug_html ) {
ob_start(array(&$batcache, 'ob'));

// It is safer to omit the final PHP closing tag.