Skip to content

Commit

Permalink
Issue backdrop-contrib#27: Remove get_magic_quotes_runtime()
Browse files Browse the repository at this point in the history
  • Loading branch information
indigoxela committed Feb 25, 2024
1 parent 5f24372 commit 6e42ba2
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions includes/smtp.phpmailer.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1437,30 +1437,8 @@ class PHPMailer {
if (!is_readable($path)) {
throw new phpmailerException(t('File Error: Could not open file: !nofile', array('!nofile' => $path)), self::STOP_CONTINUE);
}
if (function_exists('get_magic_quotes')) {
function get_magic_quotes() {
return FALSE;
}
}
$magic_quotes = get_magic_quotes_runtime();
if ($magic_quotes) {
if (version_compare(PHP_VERSION, '5.3.0', '<')) {
set_magic_quotes_runtime(0);
}
else {
ini_set('magic_quotes_runtime', 0);
}
}
$file_buffer = file_get_contents($path);
$file_buffer = $this->EncodeString($file_buffer, $encoding);
if ($magic_quotes) {
if (version_compare(PHP_VERSION, '5.3.0', '<')) {
set_magic_quotes_runtime($magic_quotes);
}
else {
ini_set('magic_quotes_runtime', $magic_quotes);
}
}
return $file_buffer;
} catch (Exception $e) {
$this->SetError($e->getMessage());
Expand Down

0 comments on commit 6e42ba2

Please sign in to comment.