Skip to content

Commit

Permalink
set_magic_quotes_runtime used in extensions/EmailPage/PHPMailer_v5.1/…
Browse files Browse the repository at this point in the history
…class.phpmailer.php (BugId:43812)

git-svn-id: svn+ssh://svn.wikia-code.com/svn/wikia/trunk@58473 e846bd91-c042-42a7-a218-4b65e2c1904d
  • Loading branch information
macbre committed Aug 17, 2012
1 parent 2016e5b commit a727697
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions extensions/EmailPage/PHPMailer_v5.1/class.phpmailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -1466,13 +1466,13 @@ function get_magic_quotes() {
return false;
}
}
if (PHP_VERSION < 6) {
if (version_compare(PHP_VERSION, '5.4', '<')) {
$magic_quotes = get_magic_quotes_runtime();
set_magic_quotes_runtime(0);
}
$file_buffer = file_get_contents($path);
$file_buffer = $this->EncodeString($file_buffer, $encoding);
if (PHP_VERSION < 6) { set_magic_quotes_runtime($magic_quotes); }
if (version_compare(PHP_VERSION, '5.4', '<')) { set_magic_quotes_runtime($magic_quotes); }
return $file_buffer;
} catch (Exception $e) {
$this->SetError($e->getMessage());
Expand Down Expand Up @@ -2317,4 +2317,3 @@ public function errorMessage() {
return $errorMsg;
}
}
?>

0 comments on commit a727697

Please sign in to comment.