mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-04 02:07:33 -05:00 
			
		
		
		
	Merge pull request #4391 from beganovich/v5-surround-strings-with-quotes-if-needed
(v5) Update surround logic for strings
This commit is contained in:
		
						commit
						a0bad23860
					
				@ -131,7 +131,7 @@ trait AppSetup
 | 
				
			|||||||
        $words_count = count(explode(' ', trim($value)));
 | 
					        $words_count = count(explode(' ', trim($value)));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (is_null($position)) {
 | 
					        if (is_null($position)) {
 | 
				
			||||||
            $env[] = "{$property}=" . $value . "\n"; // If we don't have entry for variable in the .env, write it.
 | 
					            $words_count > 1 ? $env[] = "{$property}=" . '"' . $value . '"' . "\n" : $env[] = "{$property}=" . $value . "\n";
 | 
				
			||||||
        } else if ($words_count > 1) {
 | 
					        } else if ($words_count > 1) {
 | 
				
			||||||
            $env[$position] = "{$property}=" . '"' . $value . '"' . "\n"; // If value of variable is more than one word, surround with quotes.
 | 
					            $env[$position] = "{$property}=" . '"' . $value . '"' . "\n"; // If value of variable is more than one word, surround with quotes.
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user