- string sanitizing does not remove mid-line spaces
This commit is contained in:
		
							parent
							
								
									4a2079cf10
								
							
						
					
					
						commit
						04926e4ba6
					
				@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
function explode_list(string $str) : array {
 | 
			
		||||
    if (($str = trim($str, " \n\r\t\v\0,")) !== "") {
 | 
			
		||||
        return array_map(fn($a) => trim($a), explode(",", str_replace(" ", "", $str)));
 | 
			
		||||
        return array_map(fn($a) => trim($a), explode(",", trim($str)));
 | 
			
		||||
    } else {
 | 
			
		||||
        return [];
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user