|
23 | 23 | * #002 - 26.06.2012 : commented echo invalid_address (doesn't present in current version)
|
24 | 24 | * #003 - 13.03.2015 : added auto include of class.smtp.php
|
25 | 25 | * #004 - 14.12.2016 : default CharSet changed from 'iso-8859-1' to 'utf-8'
|
| 26 | + * #005 - 11.12.2020 : commented magic_quotes functionality |
26 | 27 | */
|
27 | 28 |
|
28 | 29 | /**
|
@@ -2711,26 +2712,28 @@ protected function encodeFile($path, $encoding = 'base64')
|
2711 | 2712 | if (!is_readable($path)) {
|
2712 | 2713 | throw new phpmailerException($this->lang('file_open') . $path, self::STOP_CONTINUE);
|
2713 | 2714 | }
|
2714 |
| - $magic_quotes = get_magic_quotes_runtime(); |
2715 |
| - if ($magic_quotes) { |
2716 |
| - if (version_compare(phpversion(), '5.3.0', '<')) { |
2717 |
| - set_magic_quotes_runtime(false); |
2718 |
| - } else { |
2719 |
| - //Doesn't exist in PHP 5.4, but we don't need to check because |
2720 |
| - //get_magic_quotes_runtime always returns false in 5.4+ |
2721 |
| - //so it will never get here |
2722 |
| - ini_set('magic_quotes_runtime', false); |
2723 |
| - } |
2724 |
| - } |
| 2715 | + //#005 |
| 2716 | + //$magic_quotes = get_magic_quotes_runtime(); |
| 2717 | + //if ($magic_quotes) { |
| 2718 | + // if (version_compare(phpversion(), '5.3.0', '<')) { |
| 2719 | + // set_magic_quotes_runtime(false); |
| 2720 | + // } else { |
| 2721 | + // //Doesn't exist in PHP 5.4, but we don't need to check because |
| 2722 | + // //get_magic_quotes_runtime always returns false in 5.4+ |
| 2723 | + // //so it will never get here |
| 2724 | + // ini_set('magic_quotes_runtime', false); |
| 2725 | + // } |
| 2726 | + //} |
2725 | 2727 | $file_buffer = file_get_contents($path);
|
2726 | 2728 | $file_buffer = $this->encodeString($file_buffer, $encoding);
|
2727 |
| - if ($magic_quotes) { |
2728 |
| - if (version_compare(phpversion(), '5.3.0', '<')) { |
2729 |
| - set_magic_quotes_runtime($magic_quotes); |
2730 |
| - } else { |
2731 |
| - ini_set('magic_quotes_runtime', $magic_quotes); |
2732 |
| - } |
2733 |
| - } |
| 2729 | + //#005 |
| 2730 | + //if ($magic_quotes) { |
| 2731 | + // if (version_compare(phpversion(), '5.3.0', '<')) { |
| 2732 | + // set_magic_quotes_runtime($magic_quotes); |
| 2733 | + // } else { |
| 2734 | + // ini_set('magic_quotes_runtime', $magic_quotes); |
| 2735 | + // } |
| 2736 | + //} |
2734 | 2737 | return $file_buffer;
|
2735 | 2738 | } catch (Exception $exc) {
|
2736 | 2739 | $this->setError($exc->getMessage());
|
|
0 commit comments