WordPress.org

Make WordPress Core

Ticket #12709: phpmailer-#12709.diff

File phpmailer-#12709.diff, 861 bytes (added by j_schumann, 2 years ago)

replace set_magic_quotes_runtime in class-phpmailer.php

  • wp-includes/class-phpmailer.php

     
    14671467        } 
    14681468      } 
    14691469      if (PHP_VERSION < 6) { 
    1470         $magic_quotes = get_magic_quotes_runtime(); 
    1471         set_magic_quotes_runtime(0); 
     1470        $magic_quotes = ini_get('magic_quotes_runtime'); 
     1471        @ini_set('magic_quotes_runtime', 0); 
    14721472      } 
    14731473      $file_buffer  = file_get_contents($path); 
    14741474      $file_buffer  = $this->EncodeString($file_buffer, $encoding); 
    1475       if (PHP_VERSION < 6) { set_magic_quotes_runtime($magic_quotes); } 
     1475      if (PHP_VERSION < 6) { @ini_set('magic_quotes_runtime', $magic_quotes); } 
    14761476      return $file_buffer; 
    14771477    } catch (Exception $e) { 
    14781478      $this->SetError($e->getMessage());