Skip to content

Commit

Permalink
More array casts
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCartpenter committed Apr 26, 2024
1 parent ca6503f commit 45cc7a3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion upload/catalog/controller/checkout/register.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function index(): string {
$customer_groups = $this->model_account_customer_group->getCustomerGroups();

foreach ($customer_groups as $customer_group) {
if (in_array($customer_group['customer_group_id'], $this->config->get('config_customer_group_display'))) {
if (in_array($customer_group['customer_group_id'], (array)$this->config->get('config_customer_group_display'))) {
$data['customer_groups'][] = $customer_group;
}
}
Expand Down
2 changes: 1 addition & 1 deletion upload/catalog/model/account/customer.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Customer extends \Opencart\System\Engine\Model {
* @return int
*/
public function addCustomer(array $data): int {
if (isset($data['customer_group_id']) && is_array($this->config->get('config_customer_group_display')) && in_array($data['customer_group_id'], $this->config->get('config_customer_group_display'))) {
if (isset($data['customer_group_id']) && is_array($this->config->get('config_customer_group_display')) && in_array($data['customer_group_id'], (array)$this->config->get('config_customer_group_display'))) {
$customer_group_id = (int)$data['customer_group_id'];
} else {
$customer_group_id = (int)$this->config->get('config_customer_group_id');
Expand Down

0 comments on commit 45cc7a3

Please sign in to comment.