mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-10-26 00:42:53 -04:00 
			
		
		
		
	check object prior to testing properties
This commit is contained in:
		
							parent
							
								
									161f20fae7
								
							
						
					
					
						commit
						048405decc
					
				| @ -499,7 +499,7 @@ class Design extends BaseDesign | ||||
|                 } | ||||
|             } elseif (Str::startsWith($variable, '$custom')) { | ||||
|                 $field = explode('_', $variable); | ||||
|                 $visible = property_exists($this->client->company->custom_fields, $field[1]) && !empty($this->client->company->custom_fields->{$field[1]}); | ||||
|                 $visible = is_object($this->client->company->custom_fields) && property_exists($this->client->company->custom_fields, $field[1]) && !empty($this->client->company->custom_fields->{$field[1]}); | ||||
| 
 | ||||
|                 $elements[1]['elements'][] = ['element' => 'div', 'elements' => [ | ||||
|                     ['element' => 'span', 'content' => $variable . '_label', 'properties' => ['hidden' => !$visible, 'data-ref' => 'totals_table-' . substr($variable, 1) . '-label']], | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user