mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
Check for properties before accessing
This commit is contained in:
parent
ea5588e1e7
commit
9d0ba8d30a
@ -60,7 +60,7 @@ trait GeneratesCounter
|
||||
|
||||
$counter_entity = $client;
|
||||
} elseif ((strpos($pattern, 'groupCounter') !== false) || (strpos($pattern, 'group_counter') !== false)) {
|
||||
if (property_exists($client->group_settings, $counter_string)) {
|
||||
if (property_exists($client, 'group_settings') && property_exists($client->group_settings, $counter_string)) {
|
||||
$counter = $client->group_settings->{$counter_string};
|
||||
} else {
|
||||
$counter = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user