Change how to decide between empty update and not called field file
This commit is contained in:
		
					parent
					
						
							
								56406b9910
							
						
					
				
			
			
				commit
				
					
						458b0f3545
					
				
			
		
					 2 changed files with 1 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -291,9 +291,6 @@ class FileTag
 | 
			
		|||
        }
 | 
			
		||||
 | 
			
		||||
        $fields = ['file' => str_replace($pattern, '', $item['file'])];
 | 
			
		||||
        if ($fields === '') {
 | 
			
		||||
        	$fields = null;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        Item::update($fields, ['id' => $item_id]);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -832,7 +832,7 @@ class Item extends BaseObject
 | 
			
		|||
			$files = $fields['file'];
 | 
			
		||||
			$fields['file'] = null;
 | 
			
		||||
		} else {
 | 
			
		||||
			$files = '';
 | 
			
		||||
			$files = null;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		$delivery_data = ['postopts' => defaults($fields, 'postopts', ''),
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue