From 35e350eea1498bacbea9648e0bd424526e9a8855 Mon Sep 17 00:00:00 2001 From: Ian Edington Date: Sun, 14 Feb 2016 14:53:10 -0500 Subject: [PATCH] Check if get_magic_quotes_runtime (for php7) @set_magic_quotes_runtime() is deprecated in php7. This if statement will keep current functionality in php5 and let it also work with php7. --- includes/functions.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/functions.php b/includes/functions.php index 71120e5..d30565f 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -41,9 +41,11 @@ function satispress_send_file( $file ) { if ( function_exists( 'apache_setenv' ) ) { @apache_setenv( 'no-gzip', 1 ); } + if(get_magic_quotes_runtime()) { + @set_magic_quotes_runtime( 0 ); + } @ini_set( 'zlib.output_compression', 'Off' ); @set_time_limit( 0 ); - @set_magic_quotes_runtime( 0 ); @ob_end_clean(); if ( ob_get_level() ) { @ob_end_clean(); // Zip corruption fix.