Update magic quotes -set 0 -php7x
Update for compatibility with Antspam etc.
This commit is contained in:
		
							parent
							
								
									4330d84faa
								
							
						
					
					
						commit
						201211d80b
					
				
					 1 changed files with 7 additions and 21 deletions
				
			
		
							
								
								
									
										28
									
								
								include/thirdparty/PHPMailer/class.phpmailer.php
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										28
									
								
								include/thirdparty/PHPMailer/class.phpmailer.php
									
									
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -2710,32 +2710,18 @@ class PHPMailer
 | 
			
		|||
        try {
 | 
			
		||||
            if (!self::isPermittedPath($path) or !file_exists($path)) {
 | 
			
		||||
                throw new phpmailerException($this->lang('file_open') . $path, self::STOP_CONTINUE);
 | 
			
		||||
            }
 | 
			
		||||
            $magic_quotes = get_magic_quotes_runtime();
 | 
			
		||||
            if ($magic_quotes) {
 | 
			
		||||
                if (version_compare(PHP_VERSION, '5.3.0', '<')) {
 | 
			
		||||
                    set_magic_quotes_runtime(false);
 | 
			
		||||
                } else {
 | 
			
		||||
                    //Doesn't exist in PHP 5.4, but we don't need to check because
 | 
			
		||||
                    //get_magic_quotes_runtime always returns false in 5.4+
 | 
			
		||||
                    //so it will never get here
 | 
			
		||||
                    ini_set('magic_quotes_runtime', false);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
						// or : Deaktiviere https://www.php.net/get_magic_quotes_runtime/
 | 
			
		||||
            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);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            $file_buffer = $this->encodeString($file_buffer, $encoding);            
 | 
			
		||||
            return $file_buffer;
 | 
			
		||||
        } catch (Exception $exc) {
 | 
			
		||||
        } 
 | 
			
		||||
		catch (Exception $exc) {
 | 
			
		||||
            $this->setError($exc->getMessage());
 | 
			
		||||
            return '';
 | 
			
		||||
        }
 | 
			
		||||
          }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue