Uploaded image for project: 'Blesta Core'
  1. Blesta Core
  2. CORE-5732

Client Manage Account results in an error

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 5.13.2
    • Fix Version/s: 5.13.3
    • Component/s: Client Interface
    • Labels:
      None

      Description

      When a client visits their "Manage Account" link it shows a white page with "Contact Information" and a Profile Picture option. The following error is written to logs:

      ==> general-error-2026-01-31.log <==
      [2026-01-31T00:28:47.885214+00:00] general.ERROR: Uncaught Exception TypeError: "in_array(): Argument #2 ($haystack) must be of type array, false given" at /home/user/public_html/app/views/client/bootstrap/client_contacts_contact_info.pdt line 45

      {"exception":"[object] (TypeError(code: 0): in_array(): Argument #2 ($haystack) must be of type array, false given at /home/user/public_html/app/views/client/bootstrap/client_contacts_contact_info.pdt:45)"}

      Similar fix for

      • Adding Contacts. Contacts : Add.
      • Edit Contact
      • Make payment > Enter new Payment details (Was not able to reproduce this one though for client_pay.php)

      Fix
      Edit /app/controllers/client_contacts.php

      Replace (around line 466):

              // Get contact field groups
              foreach ($contact_fields_groups as $group_name) {
                  if ($this->client) {
                      ${$group_name} = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);
      
                      if (${$group_name}) {
                          ${$group_name} = unserialize(base64_decode(${$group_name}->value));
                      }
                  }
      
                  $contact_info[$group_name] = ${$group_name} ?? [];
              }
      

      With:

              // Get contact field groups
              foreach ($contact_fields_groups as $group_name) {
                  ${$group_name} = [];
                  if ($this->client) {
                      $setting = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);
      
                      if ($setting) {
                          $unserialized = \Blesta\Core\Util\Common\Classes\Model::safeUnserialize(
                              base64_decode($setting->value)
                          );
                          if (is_array($unserialized)) {
                              ${$group_name} = $unserialized;
                          }
                      }
                  }
      

      Edit /app/controllers/client_main.php

      Replace (around line 733):

              foreach ($contact_fields_groups as $group_name) {
                  if ($this->client) {
                      ${$group_name} = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);
      
                      if (${$group_name}) {
                          ${$group_name} = unserialize(base64_decode(${$group_name}->value));
                      }
                  }
      
                  $contact_info[$group_name] = ${$group_name} ?? [];
              }
      

      With:

              foreach ($contact_fields_groups as $group_name) {
                  ${$group_name} = [];
                  if ($this->client) {
                      $setting = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);
      
                      if ($setting) {
                          $unserialized = \Blesta\Core\Util\Common\Classes\Model::safeUnserialize(
                              base64_decode($setting->value)
                          );
                          if (is_array($unserialized)) {
                              ${$group_name} = $unserialized;
                          }
                      }
                  }
      
                  $contact_info[$group_name] = ${$group_name};
              }
      

      Edit /app/controllers/client_payphp

      Replace (around line 1392):

              // Get contact field groups
              foreach ($contact_fields_groups as $group_name) {
                  if ($this->client) {
                      ${$group_name} = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);
      
                      if (${$group_name}) {
                          ${$group_name} = unserialize(base64_decode(${$group_name}->value));
                      }
                  }
      
                  $contact_info[$group_name] = ${$group_name} ?? [];
      

      With:

              // Get contact field groups
              foreach ($contact_fields_groups as $group_name) {
                  ${$group_name} = [];
                  if ($this->client) {
                      $setting = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);
      
                      if ($setting) {
                          $unserialized = unserialize(base64_decode($setting->value));
                          if (is_array($unserialized)) {
                              ${$group_name} = $unserialized;
                          }
                      }
                  }
      
                  $contact_info[$group_name] = ${$group_name};
      

      For the Order plugin

      Edit plugins/order/controllers/signup.php (around line 278).

      Replace:

              // Get required contact fields
              $required_contact_fields = $this->ClientGroups->getSetting(
                  $this->client->client_group_id ?? $this->order_form->client_group_id,
                  'required_contact_fields'
              );
      
              if ($required_contact_fields) {
                  $required_contact_fields = unserialize(base64_decode($required_contact_fields->value));
              }
      
              // Get shown contact fields
              $shown_contact_fields = $this->ClientGroups->getSetting(
                  $this->client->client_group_id ?? $this->order_form->client_group_id,
                  'shown_contact_fields'
              );
      
              if ($shown_contact_fields) {
                  $shown_contact_fields = unserialize(base64_decode($shown_contact_fields->value));
      

      with:

              // Get required contact fields
              $required_contact_fields = [];
              $setting = $this->ClientGroups->getSetting(
                  $this->client->client_group_id ?? $this->order_form->client_group_id,
                  'required_contact_fields'
              );
      
              if ($setting) {
                  $unserialized = unserialize(base64_decode($setting->value));
                  if (is_array($unserialized)) {
                      $required_contact_fields = $unserialized;
                  }
              }
      
              // Get shown contact fields
              $shown_contact_fields = [];
              $setting = $this->ClientGroups->getSetting(
                  $this->client->client_group_id ?? $this->order_form->client_group_id,
                  'shown_contact_fields'
              );
      
              if ($setting) {
                  $unserialized = unserialize(base64_decode($setting->value));
                  if (is_array($unserialized)) {
                      $shown_contact_fields = $unserialized;
                  }
      

      Around line 324:

      Replace:

              $this->set('required_contact_fields', ($required_contact_fields ?? ''));
              $this->set('shown_contact_fields', ($shown_contact_fields ?? ''));
      

      With:

              $this->set('required_contact_fields', $required_contact_fields);
              $this->set('shown_contact_fields', $shown_contact_fields);
      

      Around line: 285

      Replace:

                  $unserialized = unserialize(base64_decode($setting->value));
      

      with:

                  $unserialized = \Blesta\Core\Util\Common\Classes\Model::safeUnserialize(
                      base64_decode($setting->value)
                  );
      

      Replace Around line 299:

                  $unserialized = unserialize(base64_decode($setting->value));
      

      with:

                 unserialized = \Blesta\Core\Util\Common\Classes\Model::safeUnserialize(
                      base64_decode($setting->value)
                  );
      

        Activity

        admin Paul Phillips created issue -
        admin Paul Phillips made changes -
        Field Original Value New Value
        Priority Major [ 3 ] Blocker [ 1 ]
        admin Paul Phillips made changes -
        Description When a client visits their "Manage Account" link it shows a white page with "Contact Information" and a Profile Picture option. The following error is written to logs:

        ==> general-error-2026-01-31.log <==
        [2026-01-31T00:28:47.885214+00:00] general.ERROR: Uncaught Exception TypeError: "in_array(): Argument #2 ($haystack) must be of type array, false given" at /home/user/public_html/app/views/client/bootstrap/client_contacts_contact_info.pdt line 45 {"exception":"[object] (TypeError(code: 0): in_array(): Argument #2 ($haystack) must be of type array, false given at /home/user/public_html/app/views/client/bootstrap/client_contacts_contact_info.pdt:45)"}
        When a client visits their "Manage Account" link it shows a white page with "Contact Information" and a Profile Picture option. The following error is written to logs:

        ==> general-error-2026-01-31.log <==
        [2026-01-31T00:28:47.885214+00:00] general.ERROR: Uncaught Exception TypeError: "in_array(): Argument #2 ($haystack) must be of type array, false given" at /home/user/public_html/app/views/client/bootstrap/client_contacts_contact_info.pdt line 45 {"exception":"[object] (TypeError(code: 0): in_array(): Argument #2 ($haystack) must be of type array, false given at /home/user/public_html/app/views/client/bootstrap/client_contacts_contact_info.pdt:45)"}

        *Fix*
        Edit /app/controllers/client_contacts.php

        Replace (around line 466):
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    if ($this->client) {
                        ${$group_name} = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if (${$group_name}) {
                            ${$group_name} = unserialize(base64_decode(${$group_name}->value));
                        }
                    }

                    $contact_info[$group_name] = ${$group_name} ?? [];
                }
        {code}

        With:
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    ${$group_name} = [];
                    if ($this->client) {
                        $setting = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if ($setting) {
                            $unserialized = unserialize(base64_decode($setting->value));
                            if (is_array($unserialized)) {
                                ${$group_name} = $unserialized;
                            }
                        }
                    }

                    $contact_info[$group_name] = ${$group_name};
                }
        {code}

        Edit /app/controllers/client_main.php

        Replace (around line 733):
        {code:java}
                foreach ($contact_fields_groups as $group_name) {
                    if ($this->client) {
                        ${$group_name} = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if (${$group_name}) {
                            ${$group_name} = unserialize(base64_decode(${$group_name}->value));
                        }
                    }

                    $contact_info[$group_name] = ${$group_name} ?? [];
                }
        {code}

        With:
        {code:java}
                foreach ($contact_fields_groups as $group_name) {
                    ${$group_name} = [];
                    if ($this->client) {
                        $setting = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if ($setting) {
                            $unserialized = unserialize(base64_decode($setting->value));
                            if (is_array($unserialized)) {
                                ${$group_name} = $unserialized;
                            }
                        }
                    }

                    $contact_info[$group_name] = ${$group_name};
                }
        {code}
        admin Paul Phillips made changes -
        Description When a client visits their "Manage Account" link it shows a white page with "Contact Information" and a Profile Picture option. The following error is written to logs:

        ==> general-error-2026-01-31.log <==
        [2026-01-31T00:28:47.885214+00:00] general.ERROR: Uncaught Exception TypeError: "in_array(): Argument #2 ($haystack) must be of type array, false given" at /home/user/public_html/app/views/client/bootstrap/client_contacts_contact_info.pdt line 45 {"exception":"[object] (TypeError(code: 0): in_array(): Argument #2 ($haystack) must be of type array, false given at /home/user/public_html/app/views/client/bootstrap/client_contacts_contact_info.pdt:45)"}

        *Fix*
        Edit /app/controllers/client_contacts.php

        Replace (around line 466):
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    if ($this->client) {
                        ${$group_name} = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if (${$group_name}) {
                            ${$group_name} = unserialize(base64_decode(${$group_name}->value));
                        }
                    }

                    $contact_info[$group_name] = ${$group_name} ?? [];
                }
        {code}

        With:
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    ${$group_name} = [];
                    if ($this->client) {
                        $setting = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if ($setting) {
                            $unserialized = unserialize(base64_decode($setting->value));
                            if (is_array($unserialized)) {
                                ${$group_name} = $unserialized;
                            }
                        }
                    }

                    $contact_info[$group_name] = ${$group_name};
                }
        {code}

        Edit /app/controllers/client_main.php

        Replace (around line 733):
        {code:java}
                foreach ($contact_fields_groups as $group_name) {
                    if ($this->client) {
                        ${$group_name} = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if (${$group_name}) {
                            ${$group_name} = unserialize(base64_decode(${$group_name}->value));
                        }
                    }

                    $contact_info[$group_name] = ${$group_name} ?? [];
                }
        {code}

        With:
        {code:java}
                foreach ($contact_fields_groups as $group_name) {
                    ${$group_name} = [];
                    if ($this->client) {
                        $setting = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if ($setting) {
                            $unserialized = unserialize(base64_decode($setting->value));
                            if (is_array($unserialized)) {
                                ${$group_name} = $unserialized;
                            }
                        }
                    }

                    $contact_info[$group_name] = ${$group_name};
                }
        {code}
        When a client visits their "Manage Account" link it shows a white page with "Contact Information" and a Profile Picture option. The following error is written to logs:

        ==> general-error-2026-01-31.log <==
        [2026-01-31T00:28:47.885214+00:00] general.ERROR: Uncaught Exception TypeError: "in_array(): Argument #2 ($haystack) must be of type array, false given" at /home/user/public_html/app/views/client/bootstrap/client_contacts_contact_info.pdt line 45 {"exception":"[object] (TypeError(code: 0): in_array(): Argument #2 ($haystack) must be of type array, false given at /home/user/public_html/app/views/client/bootstrap/client_contacts_contact_info.pdt:45)"}

        *Fix*
        Edit /app/controllers/client_contacts.php

        Replace (around line 466):
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    if ($this->client) {
                        ${$group_name} = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if (${$group_name}) {
                            ${$group_name} = unserialize(base64_decode(${$group_name}->value));
                        }
                    }

                    $contact_info[$group_name] = ${$group_name} ?? [];
                }
        {code}

        With:
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    ${$group_name} = [];
                    if ($this->client) {
                        $setting = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if ($setting) {
                            $unserialized = unserialize(base64_decode($setting->value));
                            if (is_array($unserialized)) {
                                ${$group_name} = $unserialized;
                            }
                        }
                    }

                    $contact_info[$group_name] = ${$group_name};
                }
        {code}

        Edit /app/controllers/client_main.php

        Replace (around line 733):
        {code:java}
                foreach ($contact_fields_groups as $group_name) {
                    if ($this->client) {
                        ${$group_name} = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if (${$group_name}) {
                            ${$group_name} = unserialize(base64_decode(${$group_name}->value));
                        }
                    }

                    $contact_info[$group_name] = ${$group_name} ?? [];
                }
        {code}

        With:
        {code:java}
                foreach ($contact_fields_groups as $group_name) {
                    ${$group_name} = [];
                    if ($this->client) {
                        $setting = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if ($setting) {
                            $unserialized = unserialize(base64_decode($setting->value));
                            if (is_array($unserialized)) {
                                ${$group_name} = $unserialized;
                            }
                        }
                    }

                    $contact_info[$group_name] = ${$group_name};
                }
        {code}

        Edit /app/controllers/client_payphp

        Replace (around line 1392):
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    if ($this->client) {
                        ${$group_name} = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if (${$group_name}) {
                            ${$group_name} = unserialize(base64_decode(${$group_name}->value));
                        }
                    }

                    $contact_info[$group_name] = ${$group_name} ?? [];
        {code}

        With:
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    ${$group_name} = [];
                    if ($this->client) {
                        $setting = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if ($setting) {
                            $unserialized = unserialize(base64_decode($setting->value));
                            if (is_array($unserialized)) {
                                ${$group_name} = $unserialized;
                            }
                        }
                    }

                    $contact_info[$group_name] = ${$group_name};
        {code}
        admin Paul Phillips made changes -
        Description When a client visits their "Manage Account" link it shows a white page with "Contact Information" and a Profile Picture option. The following error is written to logs:

        ==> general-error-2026-01-31.log <==
        [2026-01-31T00:28:47.885214+00:00] general.ERROR: Uncaught Exception TypeError: "in_array(): Argument #2 ($haystack) must be of type array, false given" at /home/user/public_html/app/views/client/bootstrap/client_contacts_contact_info.pdt line 45 {"exception":"[object] (TypeError(code: 0): in_array(): Argument #2 ($haystack) must be of type array, false given at /home/user/public_html/app/views/client/bootstrap/client_contacts_contact_info.pdt:45)"}

        *Fix*
        Edit /app/controllers/client_contacts.php

        Replace (around line 466):
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    if ($this->client) {
                        ${$group_name} = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if (${$group_name}) {
                            ${$group_name} = unserialize(base64_decode(${$group_name}->value));
                        }
                    }

                    $contact_info[$group_name] = ${$group_name} ?? [];
                }
        {code}

        With:
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    ${$group_name} = [];
                    if ($this->client) {
                        $setting = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if ($setting) {
                            $unserialized = unserialize(base64_decode($setting->value));
                            if (is_array($unserialized)) {
                                ${$group_name} = $unserialized;
                            }
                        }
                    }

                    $contact_info[$group_name] = ${$group_name};
                }
        {code}

        Edit /app/controllers/client_main.php

        Replace (around line 733):
        {code:java}
                foreach ($contact_fields_groups as $group_name) {
                    if ($this->client) {
                        ${$group_name} = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if (${$group_name}) {
                            ${$group_name} = unserialize(base64_decode(${$group_name}->value));
                        }
                    }

                    $contact_info[$group_name] = ${$group_name} ?? [];
                }
        {code}

        With:
        {code:java}
                foreach ($contact_fields_groups as $group_name) {
                    ${$group_name} = [];
                    if ($this->client) {
                        $setting = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if ($setting) {
                            $unserialized = unserialize(base64_decode($setting->value));
                            if (is_array($unserialized)) {
                                ${$group_name} = $unserialized;
                            }
                        }
                    }

                    $contact_info[$group_name] = ${$group_name};
                }
        {code}

        Edit /app/controllers/client_payphp

        Replace (around line 1392):
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    if ($this->client) {
                        ${$group_name} = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if (${$group_name}) {
                            ${$group_name} = unserialize(base64_decode(${$group_name}->value));
                        }
                    }

                    $contact_info[$group_name] = ${$group_name} ?? [];
        {code}

        With:
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    ${$group_name} = [];
                    if ($this->client) {
                        $setting = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if ($setting) {
                            $unserialized = unserialize(base64_decode($setting->value));
                            if (is_array($unserialized)) {
                                ${$group_name} = $unserialized;
                            }
                        }
                    }

                    $contact_info[$group_name] = ${$group_name};
        {code}
        When a client visits their "Manage Account" link it shows a white page with "Contact Information" and a Profile Picture option. The following error is written to logs:

        ==> general-error-2026-01-31.log <==
        [2026-01-31T00:28:47.885214+00:00] general.ERROR: Uncaught Exception TypeError: "in_array(): Argument #2 ($haystack) must be of type array, false given" at /home/user/public_html/app/views/client/bootstrap/client_contacts_contact_info.pdt line 45 {"exception":"[object] (TypeError(code: 0): in_array(): Argument #2 ($haystack) must be of type array, false given at /home/user/public_html/app/views/client/bootstrap/client_contacts_contact_info.pdt:45)"}

        Similar fix for
        - Adding Contacts. Contacts : Add.
        - Edit Contact

        *Fix*
        Edit /app/controllers/client_contacts.php

        Replace (around line 466):
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    if ($this->client) {
                        ${$group_name} = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if (${$group_name}) {
                            ${$group_name} = unserialize(base64_decode(${$group_name}->value));
                        }
                    }

                    $contact_info[$group_name] = ${$group_name} ?? [];
                }
        {code}

        With:
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    ${$group_name} = [];
                    if ($this->client) {
                        $setting = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if ($setting) {
                            $unserialized = unserialize(base64_decode($setting->value));
                            if (is_array($unserialized)) {
                                ${$group_name} = $unserialized;
                            }
                        }
                    }

                    $contact_info[$group_name] = ${$group_name};
                }
        {code}

        Edit /app/controllers/client_main.php

        Replace (around line 733):
        {code:java}
                foreach ($contact_fields_groups as $group_name) {
                    if ($this->client) {
                        ${$group_name} = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if (${$group_name}) {
                            ${$group_name} = unserialize(base64_decode(${$group_name}->value));
                        }
                    }

                    $contact_info[$group_name] = ${$group_name} ?? [];
                }
        {code}

        With:
        {code:java}
                foreach ($contact_fields_groups as $group_name) {
                    ${$group_name} = [];
                    if ($this->client) {
                        $setting = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if ($setting) {
                            $unserialized = unserialize(base64_decode($setting->value));
                            if (is_array($unserialized)) {
                                ${$group_name} = $unserialized;
                            }
                        }
                    }

                    $contact_info[$group_name] = ${$group_name};
                }
        {code}

        Edit /app/controllers/client_payphp

        Replace (around line 1392):
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    if ($this->client) {
                        ${$group_name} = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if (${$group_name}) {
                            ${$group_name} = unserialize(base64_decode(${$group_name}->value));
                        }
                    }

                    $contact_info[$group_name] = ${$group_name} ?? [];
        {code}

        With:
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    ${$group_name} = [];
                    if ($this->client) {
                        $setting = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if ($setting) {
                            $unserialized = unserialize(base64_decode($setting->value));
                            if (is_array($unserialized)) {
                                ${$group_name} = $unserialized;
                            }
                        }
                    }

                    $contact_info[$group_name] = ${$group_name};
        {code}
        admin Paul Phillips made changes -
        Description When a client visits their "Manage Account" link it shows a white page with "Contact Information" and a Profile Picture option. The following error is written to logs:

        ==> general-error-2026-01-31.log <==
        [2026-01-31T00:28:47.885214+00:00] general.ERROR: Uncaught Exception TypeError: "in_array(): Argument #2 ($haystack) must be of type array, false given" at /home/user/public_html/app/views/client/bootstrap/client_contacts_contact_info.pdt line 45 {"exception":"[object] (TypeError(code: 0): in_array(): Argument #2 ($haystack) must be of type array, false given at /home/user/public_html/app/views/client/bootstrap/client_contacts_contact_info.pdt:45)"}

        Similar fix for
        - Adding Contacts. Contacts : Add.
        - Edit Contact

        *Fix*
        Edit /app/controllers/client_contacts.php

        Replace (around line 466):
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    if ($this->client) {
                        ${$group_name} = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if (${$group_name}) {
                            ${$group_name} = unserialize(base64_decode(${$group_name}->value));
                        }
                    }

                    $contact_info[$group_name] = ${$group_name} ?? [];
                }
        {code}

        With:
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    ${$group_name} = [];
                    if ($this->client) {
                        $setting = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if ($setting) {
                            $unserialized = unserialize(base64_decode($setting->value));
                            if (is_array($unserialized)) {
                                ${$group_name} = $unserialized;
                            }
                        }
                    }

                    $contact_info[$group_name] = ${$group_name};
                }
        {code}

        Edit /app/controllers/client_main.php

        Replace (around line 733):
        {code:java}
                foreach ($contact_fields_groups as $group_name) {
                    if ($this->client) {
                        ${$group_name} = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if (${$group_name}) {
                            ${$group_name} = unserialize(base64_decode(${$group_name}->value));
                        }
                    }

                    $contact_info[$group_name] = ${$group_name} ?? [];
                }
        {code}

        With:
        {code:java}
                foreach ($contact_fields_groups as $group_name) {
                    ${$group_name} = [];
                    if ($this->client) {
                        $setting = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if ($setting) {
                            $unserialized = unserialize(base64_decode($setting->value));
                            if (is_array($unserialized)) {
                                ${$group_name} = $unserialized;
                            }
                        }
                    }

                    $contact_info[$group_name] = ${$group_name};
                }
        {code}

        Edit /app/controllers/client_payphp

        Replace (around line 1392):
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    if ($this->client) {
                        ${$group_name} = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if (${$group_name}) {
                            ${$group_name} = unserialize(base64_decode(${$group_name}->value));
                        }
                    }

                    $contact_info[$group_name] = ${$group_name} ?? [];
        {code}

        With:
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    ${$group_name} = [];
                    if ($this->client) {
                        $setting = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if ($setting) {
                            $unserialized = unserialize(base64_decode($setting->value));
                            if (is_array($unserialized)) {
                                ${$group_name} = $unserialized;
                            }
                        }
                    }

                    $contact_info[$group_name] = ${$group_name};
        {code}
        When a client visits their "Manage Account" link it shows a white page with "Contact Information" and a Profile Picture option. The following error is written to logs:

        ==> general-error-2026-01-31.log <==
        [2026-01-31T00:28:47.885214+00:00] general.ERROR: Uncaught Exception TypeError: "in_array(): Argument #2 ($haystack) must be of type array, false given" at /home/user/public_html/app/views/client/bootstrap/client_contacts_contact_info.pdt line 45 {"exception":"[object] (TypeError(code: 0): in_array(): Argument #2 ($haystack) must be of type array, false given at /home/user/public_html/app/views/client/bootstrap/client_contacts_contact_info.pdt:45)"}

        Similar fix for
        - Adding Contacts. Contacts : Add.
        - Edit Contact
        - Make payment > Enter new Payment details (Was not able to reproduce this one though for client_pay.php)

        *Fix*
        Edit /app/controllers/client_contacts.php

        Replace (around line 466):
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    if ($this->client) {
                        ${$group_name} = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if (${$group_name}) {
                            ${$group_name} = unserialize(base64_decode(${$group_name}->value));
                        }
                    }

                    $contact_info[$group_name] = ${$group_name} ?? [];
                }
        {code}

        With:
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    ${$group_name} = [];
                    if ($this->client) {
                        $setting = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if ($setting) {
                            $unserialized = unserialize(base64_decode($setting->value));
                            if (is_array($unserialized)) {
                                ${$group_name} = $unserialized;
                            }
                        }
                    }

                    $contact_info[$group_name] = ${$group_name};
                }
        {code}

        Edit /app/controllers/client_main.php

        Replace (around line 733):
        {code:java}
                foreach ($contact_fields_groups as $group_name) {
                    if ($this->client) {
                        ${$group_name} = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if (${$group_name}) {
                            ${$group_name} = unserialize(base64_decode(${$group_name}->value));
                        }
                    }

                    $contact_info[$group_name] = ${$group_name} ?? [];
                }
        {code}

        With:
        {code:java}
                foreach ($contact_fields_groups as $group_name) {
                    ${$group_name} = [];
                    if ($this->client) {
                        $setting = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if ($setting) {
                            $unserialized = unserialize(base64_decode($setting->value));
                            if (is_array($unserialized)) {
                                ${$group_name} = $unserialized;
                            }
                        }
                    }

                    $contact_info[$group_name] = ${$group_name};
                }
        {code}

        Edit /app/controllers/client_payphp

        Replace (around line 1392):
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    if ($this->client) {
                        ${$group_name} = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if (${$group_name}) {
                            ${$group_name} = unserialize(base64_decode(${$group_name}->value));
                        }
                    }

                    $contact_info[$group_name] = ${$group_name} ?? [];
        {code}

        With:
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    ${$group_name} = [];
                    if ($this->client) {
                        $setting = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if ($setting) {
                            $unserialized = unserialize(base64_decode($setting->value));
                            if (is_array($unserialized)) {
                                ${$group_name} = $unserialized;
                            }
                        }
                    }

                    $contact_info[$group_name] = ${$group_name};
        {code}
        admin Paul Phillips made changes -
        Status Open [ 1 ] In Review [ 5 ]
        Resolution Fixed [ 1 ]
        admin Paul Phillips made changes -
        Description When a client visits their "Manage Account" link it shows a white page with "Contact Information" and a Profile Picture option. The following error is written to logs:

        ==> general-error-2026-01-31.log <==
        [2026-01-31T00:28:47.885214+00:00] general.ERROR: Uncaught Exception TypeError: "in_array(): Argument #2 ($haystack) must be of type array, false given" at /home/user/public_html/app/views/client/bootstrap/client_contacts_contact_info.pdt line 45 {"exception":"[object] (TypeError(code: 0): in_array(): Argument #2 ($haystack) must be of type array, false given at /home/user/public_html/app/views/client/bootstrap/client_contacts_contact_info.pdt:45)"}

        Similar fix for
        - Adding Contacts. Contacts : Add.
        - Edit Contact
        - Make payment > Enter new Payment details (Was not able to reproduce this one though for client_pay.php)

        *Fix*
        Edit /app/controllers/client_contacts.php

        Replace (around line 466):
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    if ($this->client) {
                        ${$group_name} = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if (${$group_name}) {
                            ${$group_name} = unserialize(base64_decode(${$group_name}->value));
                        }
                    }

                    $contact_info[$group_name] = ${$group_name} ?? [];
                }
        {code}

        With:
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    ${$group_name} = [];
                    if ($this->client) {
                        $setting = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if ($setting) {
                            $unserialized = unserialize(base64_decode($setting->value));
                            if (is_array($unserialized)) {
                                ${$group_name} = $unserialized;
                            }
                        }
                    }

                    $contact_info[$group_name] = ${$group_name};
                }
        {code}

        Edit /app/controllers/client_main.php

        Replace (around line 733):
        {code:java}
                foreach ($contact_fields_groups as $group_name) {
                    if ($this->client) {
                        ${$group_name} = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if (${$group_name}) {
                            ${$group_name} = unserialize(base64_decode(${$group_name}->value));
                        }
                    }

                    $contact_info[$group_name] = ${$group_name} ?? [];
                }
        {code}

        With:
        {code:java}
                foreach ($contact_fields_groups as $group_name) {
                    ${$group_name} = [];
                    if ($this->client) {
                        $setting = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if ($setting) {
                            $unserialized = unserialize(base64_decode($setting->value));
                            if (is_array($unserialized)) {
                                ${$group_name} = $unserialized;
                            }
                        }
                    }

                    $contact_info[$group_name] = ${$group_name};
                }
        {code}

        Edit /app/controllers/client_payphp

        Replace (around line 1392):
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    if ($this->client) {
                        ${$group_name} = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if (${$group_name}) {
                            ${$group_name} = unserialize(base64_decode(${$group_name}->value));
                        }
                    }

                    $contact_info[$group_name] = ${$group_name} ?? [];
        {code}

        With:
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    ${$group_name} = [];
                    if ($this->client) {
                        $setting = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if ($setting) {
                            $unserialized = unserialize(base64_decode($setting->value));
                            if (is_array($unserialized)) {
                                ${$group_name} = $unserialized;
                            }
                        }
                    }

                    $contact_info[$group_name] = ${$group_name};
        {code}
        When a client visits their "Manage Account" link it shows a white page with "Contact Information" and a Profile Picture option. The following error is written to logs:

        ==> general-error-2026-01-31.log <==
        [2026-01-31T00:28:47.885214+00:00] general.ERROR: Uncaught Exception TypeError: "in_array(): Argument #2 ($haystack) must be of type array, false given" at /home/user/public_html/app/views/client/bootstrap/client_contacts_contact_info.pdt line 45 {"exception":"[object] (TypeError(code: 0): in_array(): Argument #2 ($haystack) must be of type array, false given at /home/user/public_html/app/views/client/bootstrap/client_contacts_contact_info.pdt:45)"}

        Similar fix for
        - Adding Contacts. Contacts : Add.
        - Edit Contact
        - Make payment > Enter new Payment details (Was not able to reproduce this one though for client_pay.php)

        *Fix*
        Edit /app/controllers/client_contacts.php

        Replace (around line 466):
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    if ($this->client) {
                        ${$group_name} = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if (${$group_name}) {
                            ${$group_name} = unserialize(base64_decode(${$group_name}->value));
                        }
                    }

                    $contact_info[$group_name] = ${$group_name} ?? [];
                }
        {code}

        With:
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    ${$group_name} = [];
                    if ($this->client) {
                        $setting = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if ($setting) {
                            $unserialized = unserialize(base64_decode($setting->value));
                            if (is_array($unserialized)) {
                                ${$group_name} = $unserialized;
                            }
                        }
                    }

                    $contact_info[$group_name] = ${$group_name};
                }
        {code}

        Edit /app/controllers/client_main.php

        Replace (around line 733):
        {code:java}
                foreach ($contact_fields_groups as $group_name) {
                    if ($this->client) {
                        ${$group_name} = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if (${$group_name}) {
                            ${$group_name} = unserialize(base64_decode(${$group_name}->value));
                        }
                    }

                    $contact_info[$group_name] = ${$group_name} ?? [];
                }
        {code}

        With:
        {code:java}
                foreach ($contact_fields_groups as $group_name) {
                    ${$group_name} = [];
                    if ($this->client) {
                        $setting = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if ($setting) {
                            $unserialized = unserialize(base64_decode($setting->value));
                            if (is_array($unserialized)) {
                                ${$group_name} = $unserialized;
                            }
                        }
                    }

                    $contact_info[$group_name] = ${$group_name};
                }
        {code}

        Edit /app/controllers/client_payphp

        Replace (around line 1392):
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    if ($this->client) {
                        ${$group_name} = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if (${$group_name}) {
                            ${$group_name} = unserialize(base64_decode(${$group_name}->value));
                        }
                    }

                    $contact_info[$group_name] = ${$group_name} ?? [];
        {code}

        With:
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    ${$group_name} = [];
                    if ($this->client) {
                        $setting = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if ($setting) {
                            $unserialized = unserialize(base64_decode($setting->value));
                            if (is_array($unserialized)) {
                                ${$group_name} = $unserialized;
                            }
                        }
                    }

                    $contact_info[$group_name] = ${$group_name};
        {code}

        *For the Order plugin*

        Edit plugins/order/controllers/signup.php (around line 278).

        Replace:
                // Get required contact fields
                $required_contact_fields = $this->ClientGroups->getSetting(
                    $this->client->client_group_id ?? $this->order_form->client_group_id,
                    'required_contact_fields'
                );

                if ($required_contact_fields) {
                    $required_contact_fields = unserialize(base64_decode($required_contact_fields->value));
                }

                // Get shown contact fields
                $shown_contact_fields = $this->ClientGroups->getSetting(
                    $this->client->client_group_id ?? $this->order_form->client_group_id,
                    'shown_contact_fields'
                );

                if ($shown_contact_fields) {
                    $shown_contact_fields = unserialize(base64_decode($shown_contact_fields->value));

        admin Paul Phillips made changes -
        Description When a client visits their "Manage Account" link it shows a white page with "Contact Information" and a Profile Picture option. The following error is written to logs:

        ==> general-error-2026-01-31.log <==
        [2026-01-31T00:28:47.885214+00:00] general.ERROR: Uncaught Exception TypeError: "in_array(): Argument #2 ($haystack) must be of type array, false given" at /home/user/public_html/app/views/client/bootstrap/client_contacts_contact_info.pdt line 45 {"exception":"[object] (TypeError(code: 0): in_array(): Argument #2 ($haystack) must be of type array, false given at /home/user/public_html/app/views/client/bootstrap/client_contacts_contact_info.pdt:45)"}

        Similar fix for
        - Adding Contacts. Contacts : Add.
        - Edit Contact
        - Make payment > Enter new Payment details (Was not able to reproduce this one though for client_pay.php)

        *Fix*
        Edit /app/controllers/client_contacts.php

        Replace (around line 466):
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    if ($this->client) {
                        ${$group_name} = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if (${$group_name}) {
                            ${$group_name} = unserialize(base64_decode(${$group_name}->value));
                        }
                    }

                    $contact_info[$group_name] = ${$group_name} ?? [];
                }
        {code}

        With:
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    ${$group_name} = [];
                    if ($this->client) {
                        $setting = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if ($setting) {
                            $unserialized = unserialize(base64_decode($setting->value));
                            if (is_array($unserialized)) {
                                ${$group_name} = $unserialized;
                            }
                        }
                    }

                    $contact_info[$group_name] = ${$group_name};
                }
        {code}

        Edit /app/controllers/client_main.php

        Replace (around line 733):
        {code:java}
                foreach ($contact_fields_groups as $group_name) {
                    if ($this->client) {
                        ${$group_name} = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if (${$group_name}) {
                            ${$group_name} = unserialize(base64_decode(${$group_name}->value));
                        }
                    }

                    $contact_info[$group_name] = ${$group_name} ?? [];
                }
        {code}

        With:
        {code:java}
                foreach ($contact_fields_groups as $group_name) {
                    ${$group_name} = [];
                    if ($this->client) {
                        $setting = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if ($setting) {
                            $unserialized = unserialize(base64_decode($setting->value));
                            if (is_array($unserialized)) {
                                ${$group_name} = $unserialized;
                            }
                        }
                    }

                    $contact_info[$group_name] = ${$group_name};
                }
        {code}

        Edit /app/controllers/client_payphp

        Replace (around line 1392):
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    if ($this->client) {
                        ${$group_name} = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if (${$group_name}) {
                            ${$group_name} = unserialize(base64_decode(${$group_name}->value));
                        }
                    }

                    $contact_info[$group_name] = ${$group_name} ?? [];
        {code}

        With:
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    ${$group_name} = [];
                    if ($this->client) {
                        $setting = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if ($setting) {
                            $unserialized = unserialize(base64_decode($setting->value));
                            if (is_array($unserialized)) {
                                ${$group_name} = $unserialized;
                            }
                        }
                    }

                    $contact_info[$group_name] = ${$group_name};
        {code}

        *For the Order plugin*

        Edit plugins/order/controllers/signup.php (around line 278).

        Replace:
                // Get required contact fields
                $required_contact_fields = $this->ClientGroups->getSetting(
                    $this->client->client_group_id ?? $this->order_form->client_group_id,
                    'required_contact_fields'
                );

                if ($required_contact_fields) {
                    $required_contact_fields = unserialize(base64_decode($required_contact_fields->value));
                }

                // Get shown contact fields
                $shown_contact_fields = $this->ClientGroups->getSetting(
                    $this->client->client_group_id ?? $this->order_form->client_group_id,
                    'shown_contact_fields'
                );

                if ($shown_contact_fields) {
                    $shown_contact_fields = unserialize(base64_decode($shown_contact_fields->value));

        When a client visits their "Manage Account" link it shows a white page with "Contact Information" and a Profile Picture option. The following error is written to logs:

        ==> general-error-2026-01-31.log <==
        [2026-01-31T00:28:47.885214+00:00] general.ERROR: Uncaught Exception TypeError: "in_array(): Argument #2 ($haystack) must be of type array, false given" at /home/user/public_html/app/views/client/bootstrap/client_contacts_contact_info.pdt line 45 {"exception":"[object] (TypeError(code: 0): in_array(): Argument #2 ($haystack) must be of type array, false given at /home/user/public_html/app/views/client/bootstrap/client_contacts_contact_info.pdt:45)"}

        Similar fix for
        - Adding Contacts. Contacts : Add.
        - Edit Contact
        - Make payment > Enter new Payment details (Was not able to reproduce this one though for client_pay.php)

        *Fix*
        Edit /app/controllers/client_contacts.php

        Replace (around line 466):
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    if ($this->client) {
                        ${$group_name} = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if (${$group_name}) {
                            ${$group_name} = unserialize(base64_decode(${$group_name}->value));
                        }
                    }

                    $contact_info[$group_name] = ${$group_name} ?? [];
                }
        {code}

        With:
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    ${$group_name} = [];
                    if ($this->client) {
                        $setting = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if ($setting) {
                            $unserialized = unserialize(base64_decode($setting->value));
                            if (is_array($unserialized)) {
                                ${$group_name} = $unserialized;
                            }
                        }
                    }

                    $contact_info[$group_name] = ${$group_name};
                }
        {code}

        Edit /app/controllers/client_main.php

        Replace (around line 733):
        {code:java}
                foreach ($contact_fields_groups as $group_name) {
                    if ($this->client) {
                        ${$group_name} = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if (${$group_name}) {
                            ${$group_name} = unserialize(base64_decode(${$group_name}->value));
                        }
                    }

                    $contact_info[$group_name] = ${$group_name} ?? [];
                }
        {code}

        With:
        {code:java}
                foreach ($contact_fields_groups as $group_name) {
                    ${$group_name} = [];
                    if ($this->client) {
                        $setting = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if ($setting) {
                            $unserialized = unserialize(base64_decode($setting->value));
                            if (is_array($unserialized)) {
                                ${$group_name} = $unserialized;
                            }
                        }
                    }

                    $contact_info[$group_name] = ${$group_name};
                }
        {code}

        Edit /app/controllers/client_payphp

        Replace (around line 1392):
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    if ($this->client) {
                        ${$group_name} = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if (${$group_name}) {
                            ${$group_name} = unserialize(base64_decode(${$group_name}->value));
                        }
                    }

                    $contact_info[$group_name] = ${$group_name} ?? [];
        {code}

        With:
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    ${$group_name} = [];
                    if ($this->client) {
                        $setting = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if ($setting) {
                            $unserialized = unserialize(base64_decode($setting->value));
                            if (is_array($unserialized)) {
                                ${$group_name} = $unserialized;
                            }
                        }
                    }

                    $contact_info[$group_name] = ${$group_name};
        {code}

        *For the Order plugin*

        Edit plugins/order/controllers/signup.php (around line 278).

        Replace:
        {code:java}
                // Get required contact fields
                $required_contact_fields = $this->ClientGroups->getSetting(
                    $this->client->client_group_id ?? $this->order_form->client_group_id,
                    'required_contact_fields'
                );

                if ($required_contact_fields) {
                    $required_contact_fields = unserialize(base64_decode($required_contact_fields->value));
                }

                // Get shown contact fields
                $shown_contact_fields = $this->ClientGroups->getSetting(
                    $this->client->client_group_id ?? $this->order_form->client_group_id,
                    'shown_contact_fields'
                );

                if ($shown_contact_fields) {
                    $shown_contact_fields = unserialize(base64_decode($shown_contact_fields->value));
        {code}

        with:
        {code:java}
                // Get required contact fields
                $required_contact_fields = [];
                $setting = $this->ClientGroups->getSetting(
                    $this->client->client_group_id ?? $this->order_form->client_group_id,
                    'required_contact_fields'
                );

                if ($setting) {
                    $unserialized = unserialize(base64_decode($setting->value));
                    if (is_array($unserialized)) {
                        $required_contact_fields = $unserialized;
                    }
                }

                // Get shown contact fields
                $shown_contact_fields = [];
                $setting = $this->ClientGroups->getSetting(
                    $this->client->client_group_id ?? $this->order_form->client_group_id,
                    'shown_contact_fields'
                );

                if ($setting) {
                    $unserialized = unserialize(base64_decode($setting->value));
                    if (is_array($unserialized)) {
                        $shown_contact_fields = $unserialized;
                    }
        {code}

        Around line 324:

        Replace:
        {code:java}
                $this->set('required_contact_fields', ($required_contact_fields ?? ''));
                $this->set('shown_contact_fields', ($shown_contact_fields ?? ''));
        {code}

        With:
        {code:java}
                $this->set('required_contact_fields', $required_contact_fields);
                $this->set('shown_contact_fields', $shown_contact_fields);
        {code}

        admin Paul Phillips made changes -
        Description When a client visits their "Manage Account" link it shows a white page with "Contact Information" and a Profile Picture option. The following error is written to logs:

        ==> general-error-2026-01-31.log <==
        [2026-01-31T00:28:47.885214+00:00] general.ERROR: Uncaught Exception TypeError: "in_array(): Argument #2 ($haystack) must be of type array, false given" at /home/user/public_html/app/views/client/bootstrap/client_contacts_contact_info.pdt line 45 {"exception":"[object] (TypeError(code: 0): in_array(): Argument #2 ($haystack) must be of type array, false given at /home/user/public_html/app/views/client/bootstrap/client_contacts_contact_info.pdt:45)"}

        Similar fix for
        - Adding Contacts. Contacts : Add.
        - Edit Contact
        - Make payment > Enter new Payment details (Was not able to reproduce this one though for client_pay.php)

        *Fix*
        Edit /app/controllers/client_contacts.php

        Replace (around line 466):
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    if ($this->client) {
                        ${$group_name} = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if (${$group_name}) {
                            ${$group_name} = unserialize(base64_decode(${$group_name}->value));
                        }
                    }

                    $contact_info[$group_name] = ${$group_name} ?? [];
                }
        {code}

        With:
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    ${$group_name} = [];
                    if ($this->client) {
                        $setting = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if ($setting) {
                            $unserialized = unserialize(base64_decode($setting->value));
                            if (is_array($unserialized)) {
                                ${$group_name} = $unserialized;
                            }
                        }
                    }

                    $contact_info[$group_name] = ${$group_name};
                }
        {code}

        Edit /app/controllers/client_main.php

        Replace (around line 733):
        {code:java}
                foreach ($contact_fields_groups as $group_name) {
                    if ($this->client) {
                        ${$group_name} = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if (${$group_name}) {
                            ${$group_name} = unserialize(base64_decode(${$group_name}->value));
                        }
                    }

                    $contact_info[$group_name] = ${$group_name} ?? [];
                }
        {code}

        With:
        {code:java}
                foreach ($contact_fields_groups as $group_name) {
                    ${$group_name} = [];
                    if ($this->client) {
                        $setting = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if ($setting) {
                            $unserialized = unserialize(base64_decode($setting->value));
                            if (is_array($unserialized)) {
                                ${$group_name} = $unserialized;
                            }
                        }
                    }

                    $contact_info[$group_name] = ${$group_name};
                }
        {code}

        Edit /app/controllers/client_payphp

        Replace (around line 1392):
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    if ($this->client) {
                        ${$group_name} = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if (${$group_name}) {
                            ${$group_name} = unserialize(base64_decode(${$group_name}->value));
                        }
                    }

                    $contact_info[$group_name] = ${$group_name} ?? [];
        {code}

        With:
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    ${$group_name} = [];
                    if ($this->client) {
                        $setting = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if ($setting) {
                            $unserialized = unserialize(base64_decode($setting->value));
                            if (is_array($unserialized)) {
                                ${$group_name} = $unserialized;
                            }
                        }
                    }

                    $contact_info[$group_name] = ${$group_name};
        {code}

        *For the Order plugin*

        Edit plugins/order/controllers/signup.php (around line 278).

        Replace:
        {code:java}
                // Get required contact fields
                $required_contact_fields = $this->ClientGroups->getSetting(
                    $this->client->client_group_id ?? $this->order_form->client_group_id,
                    'required_contact_fields'
                );

                if ($required_contact_fields) {
                    $required_contact_fields = unserialize(base64_decode($required_contact_fields->value));
                }

                // Get shown contact fields
                $shown_contact_fields = $this->ClientGroups->getSetting(
                    $this->client->client_group_id ?? $this->order_form->client_group_id,
                    'shown_contact_fields'
                );

                if ($shown_contact_fields) {
                    $shown_contact_fields = unserialize(base64_decode($shown_contact_fields->value));
        {code}

        with:
        {code:java}
                // Get required contact fields
                $required_contact_fields = [];
                $setting = $this->ClientGroups->getSetting(
                    $this->client->client_group_id ?? $this->order_form->client_group_id,
                    'required_contact_fields'
                );

                if ($setting) {
                    $unserialized = unserialize(base64_decode($setting->value));
                    if (is_array($unserialized)) {
                        $required_contact_fields = $unserialized;
                    }
                }

                // Get shown contact fields
                $shown_contact_fields = [];
                $setting = $this->ClientGroups->getSetting(
                    $this->client->client_group_id ?? $this->order_form->client_group_id,
                    'shown_contact_fields'
                );

                if ($setting) {
                    $unserialized = unserialize(base64_decode($setting->value));
                    if (is_array($unserialized)) {
                        $shown_contact_fields = $unserialized;
                    }
        {code}

        Around line 324:

        Replace:
        {code:java}
                $this->set('required_contact_fields', ($required_contact_fields ?? ''));
                $this->set('shown_contact_fields', ($shown_contact_fields ?? ''));
        {code}

        With:
        {code:java}
                $this->set('required_contact_fields', $required_contact_fields);
                $this->set('shown_contact_fields', $shown_contact_fields);
        {code}

        When a client visits their "Manage Account" link it shows a white page with "Contact Information" and a Profile Picture option. The following error is written to logs:

        ==> general-error-2026-01-31.log <==
        [2026-01-31T00:28:47.885214+00:00] general.ERROR: Uncaught Exception TypeError: "in_array(): Argument #2 ($haystack) must be of type array, false given" at /home/user/public_html/app/views/client/bootstrap/client_contacts_contact_info.pdt line 45 {"exception":"[object] (TypeError(code: 0): in_array(): Argument #2 ($haystack) must be of type array, false given at /home/user/public_html/app/views/client/bootstrap/client_contacts_contact_info.pdt:45)"}

        Similar fix for
        - Adding Contacts. Contacts : Add.
        - Edit Contact
        - Make payment > Enter new Payment details (Was not able to reproduce this one though for client_pay.php)

        *Fix*
        Edit /app/controllers/client_contacts.php

        Replace (around line 466):
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    if ($this->client) {
                        ${$group_name} = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if (${$group_name}) {
                            ${$group_name} = unserialize(base64_decode(${$group_name}->value));
                        }
                    }

                    $contact_info[$group_name] = ${$group_name} ?? [];
                }
        {code}

        With:
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    ${$group_name} = [];
                    if ($this->client) {
                        $setting = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if ($setting) {
                            $unserialized = unserialize(base64_decode($setting->value));
                            if (is_array($unserialized)) {
                                ${$group_name} = $unserialized;
                            }
                        }
                    }

                    $contact_info[$group_name] = ${$group_name};
                }
        {code}

        Edit /app/controllers/client_main.php

        Replace (around line 733):
        {code:java}
                foreach ($contact_fields_groups as $group_name) {
                    if ($this->client) {
                        ${$group_name} = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if (${$group_name}) {
                            ${$group_name} = unserialize(base64_decode(${$group_name}->value));
                        }
                    }

                    $contact_info[$group_name] = ${$group_name} ?? [];
                }
        {code}

        With:
        {code:java}
                foreach ($contact_fields_groups as $group_name) {
                    ${$group_name} = [];
                    if ($this->client) {
                        $setting = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if ($setting) {
                            $unserialized = unserialize(base64_decode($setting->value));
                            if (is_array($unserialized)) {
                                ${$group_name} = $unserialized;
                            }
                        }
                    }

                    $contact_info[$group_name] = ${$group_name};
                }
        {code}

        Edit /app/controllers/client_payphp

        Replace (around line 1392):
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    if ($this->client) {
                        ${$group_name} = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if (${$group_name}) {
                            ${$group_name} = unserialize(base64_decode(${$group_name}->value));
                        }
                    }

                    $contact_info[$group_name] = ${$group_name} ?? [];
        {code}

        With:
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    ${$group_name} = [];
                    if ($this->client) {
                        $setting = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if ($setting) {
                            $unserialized = unserialize(base64_decode($setting->value));
                            if (is_array($unserialized)) {
                                ${$group_name} = $unserialized;
                            }
                        }
                    }

                    $contact_info[$group_name] = ${$group_name};
        {code}

        *For the Order plugin*

        Edit plugins/order/controllers/signup.php (around line 278).

        Replace:
        {code:java}
                // Get required contact fields
                $required_contact_fields = $this->ClientGroups->getSetting(
                    $this->client->client_group_id ?? $this->order_form->client_group_id,
                    'required_contact_fields'
                );

                if ($required_contact_fields) {
                    $required_contact_fields = unserialize(base64_decode($required_contact_fields->value));
                }

                // Get shown contact fields
                $shown_contact_fields = $this->ClientGroups->getSetting(
                    $this->client->client_group_id ?? $this->order_form->client_group_id,
                    'shown_contact_fields'
                );

                if ($shown_contact_fields) {
                    $shown_contact_fields = unserialize(base64_decode($shown_contact_fields->value));
        {code}

        with:
        {code:java}
                // Get required contact fields
                $required_contact_fields = [];
                $setting = $this->ClientGroups->getSetting(
                    $this->client->client_group_id ?? $this->order_form->client_group_id,
                    'required_contact_fields'
                );

                if ($setting) {
                    $unserialized = unserialize(base64_decode($setting->value));
                    if (is_array($unserialized)) {
                        $required_contact_fields = $unserialized;
                    }
                }

                // Get shown contact fields
                $shown_contact_fields = [];
                $setting = $this->ClientGroups->getSetting(
                    $this->client->client_group_id ?? $this->order_form->client_group_id,
                    'shown_contact_fields'
                );

                if ($setting) {
                    $unserialized = unserialize(base64_decode($setting->value));
                    if (is_array($unserialized)) {
                        $shown_contact_fields = $unserialized;
                    }
        {code}

        Around line 324:

        Replace:
        {code:java}
                $this->set('required_contact_fields', ($required_contact_fields ?? ''));
                $this->set('shown_contact_fields', ($shown_contact_fields ?? ''));
        {code}

        With:
        {code:java}
                $this->set('required_contact_fields', $required_contact_fields);
                $this->set('shown_contact_fields', $shown_contact_fields);
        {code}


        Around line: 285

        Replace:

        {code:java}
                    $unserialized = unserialize(base64_decode($setting->value));
        {code}

        with:
        {code:java}
                    $unserialized = \Blesta\Core\Util\Common\Classes\Model::safeUnserialize(
                        base64_decode($setting->value)
                    );
        {code}

        Replace Around line 299:
        {code:java}
                    $unserialized = unserialize(base64_decode($setting->value));
        {code}

        with:
        {code:java}
                   unserialized = \Blesta\Core\Util\Common\Classes\Model::safeUnserialize(
                        base64_decode($setting->value)
                    );
        {code}

        admin Paul Phillips made changes -
        Description When a client visits their "Manage Account" link it shows a white page with "Contact Information" and a Profile Picture option. The following error is written to logs:

        ==> general-error-2026-01-31.log <==
        [2026-01-31T00:28:47.885214+00:00] general.ERROR: Uncaught Exception TypeError: "in_array(): Argument #2 ($haystack) must be of type array, false given" at /home/user/public_html/app/views/client/bootstrap/client_contacts_contact_info.pdt line 45 {"exception":"[object] (TypeError(code: 0): in_array(): Argument #2 ($haystack) must be of type array, false given at /home/user/public_html/app/views/client/bootstrap/client_contacts_contact_info.pdt:45)"}

        Similar fix for
        - Adding Contacts. Contacts : Add.
        - Edit Contact
        - Make payment > Enter new Payment details (Was not able to reproduce this one though for client_pay.php)

        *Fix*
        Edit /app/controllers/client_contacts.php

        Replace (around line 466):
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    if ($this->client) {
                        ${$group_name} = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if (${$group_name}) {
                            ${$group_name} = unserialize(base64_decode(${$group_name}->value));
                        }
                    }

                    $contact_info[$group_name] = ${$group_name} ?? [];
                }
        {code}

        With:
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    ${$group_name} = [];
                    if ($this->client) {
                        $setting = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if ($setting) {
                            $unserialized = unserialize(base64_decode($setting->value));
                            if (is_array($unserialized)) {
                                ${$group_name} = $unserialized;
                            }
                        }
                    }

                    $contact_info[$group_name] = ${$group_name};
                }
        {code}

        Edit /app/controllers/client_main.php

        Replace (around line 733):
        {code:java}
                foreach ($contact_fields_groups as $group_name) {
                    if ($this->client) {
                        ${$group_name} = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if (${$group_name}) {
                            ${$group_name} = unserialize(base64_decode(${$group_name}->value));
                        }
                    }

                    $contact_info[$group_name] = ${$group_name} ?? [];
                }
        {code}

        With:
        {code:java}
                foreach ($contact_fields_groups as $group_name) {
                    ${$group_name} = [];
                    if ($this->client) {
                        $setting = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if ($setting) {
                            $unserialized = unserialize(base64_decode($setting->value));
                            if (is_array($unserialized)) {
                                ${$group_name} = $unserialized;
                            }
                        }
                    }

                    $contact_info[$group_name] = ${$group_name};
                }
        {code}

        Edit /app/controllers/client_payphp

        Replace (around line 1392):
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    if ($this->client) {
                        ${$group_name} = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if (${$group_name}) {
                            ${$group_name} = unserialize(base64_decode(${$group_name}->value));
                        }
                    }

                    $contact_info[$group_name] = ${$group_name} ?? [];
        {code}

        With:
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    ${$group_name} = [];
                    if ($this->client) {
                        $setting = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if ($setting) {
                            $unserialized = unserialize(base64_decode($setting->value));
                            if (is_array($unserialized)) {
                                ${$group_name} = $unserialized;
                            }
                        }
                    }

                    $contact_info[$group_name] = ${$group_name};
        {code}

        *For the Order plugin*

        Edit plugins/order/controllers/signup.php (around line 278).

        Replace:
        {code:java}
                // Get required contact fields
                $required_contact_fields = $this->ClientGroups->getSetting(
                    $this->client->client_group_id ?? $this->order_form->client_group_id,
                    'required_contact_fields'
                );

                if ($required_contact_fields) {
                    $required_contact_fields = unserialize(base64_decode($required_contact_fields->value));
                }

                // Get shown contact fields
                $shown_contact_fields = $this->ClientGroups->getSetting(
                    $this->client->client_group_id ?? $this->order_form->client_group_id,
                    'shown_contact_fields'
                );

                if ($shown_contact_fields) {
                    $shown_contact_fields = unserialize(base64_decode($shown_contact_fields->value));
        {code}

        with:
        {code:java}
                // Get required contact fields
                $required_contact_fields = [];
                $setting = $this->ClientGroups->getSetting(
                    $this->client->client_group_id ?? $this->order_form->client_group_id,
                    'required_contact_fields'
                );

                if ($setting) {
                    $unserialized = unserialize(base64_decode($setting->value));
                    if (is_array($unserialized)) {
                        $required_contact_fields = $unserialized;
                    }
                }

                // Get shown contact fields
                $shown_contact_fields = [];
                $setting = $this->ClientGroups->getSetting(
                    $this->client->client_group_id ?? $this->order_form->client_group_id,
                    'shown_contact_fields'
                );

                if ($setting) {
                    $unserialized = unserialize(base64_decode($setting->value));
                    if (is_array($unserialized)) {
                        $shown_contact_fields = $unserialized;
                    }
        {code}

        Around line 324:

        Replace:
        {code:java}
                $this->set('required_contact_fields', ($required_contact_fields ?? ''));
                $this->set('shown_contact_fields', ($shown_contact_fields ?? ''));
        {code}

        With:
        {code:java}
                $this->set('required_contact_fields', $required_contact_fields);
                $this->set('shown_contact_fields', $shown_contact_fields);
        {code}


        Around line: 285

        Replace:

        {code:java}
                    $unserialized = unserialize(base64_decode($setting->value));
        {code}

        with:
        {code:java}
                    $unserialized = \Blesta\Core\Util\Common\Classes\Model::safeUnserialize(
                        base64_decode($setting->value)
                    );
        {code}

        Replace Around line 299:
        {code:java}
                    $unserialized = unserialize(base64_decode($setting->value));
        {code}

        with:
        {code:java}
                   unserialized = \Blesta\Core\Util\Common\Classes\Model::safeUnserialize(
                        base64_decode($setting->value)
                    );
        {code}

        When a client visits their "Manage Account" link it shows a white page with "Contact Information" and a Profile Picture option. The following error is written to logs:

        ==> general-error-2026-01-31.log <==
        [2026-01-31T00:28:47.885214+00:00] general.ERROR: Uncaught Exception TypeError: "in_array(): Argument #2 ($haystack) must be of type array, false given" at /home/user/public_html/app/views/client/bootstrap/client_contacts_contact_info.pdt line 45 {"exception":"[object] (TypeError(code: 0): in_array(): Argument #2 ($haystack) must be of type array, false given at /home/user/public_html/app/views/client/bootstrap/client_contacts_contact_info.pdt:45)"}

        Similar fix for
        - Adding Contacts. Contacts : Add.
        - Edit Contact
        - Make payment > Enter new Payment details (Was not able to reproduce this one though for client_pay.php)

        *Fix*
        Edit /app/controllers/client_contacts.php

        Replace (around line 466):
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    if ($this->client) {
                        ${$group_name} = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if (${$group_name}) {
                            ${$group_name} = unserialize(base64_decode(${$group_name}->value));
                        }
                    }

                    $contact_info[$group_name] = ${$group_name} ?? [];
                }
        {code}

        With:
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    ${$group_name} = [];
                    if ($this->client) {
                        $setting = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if ($setting) {
                             $unserialized = \Blesta\Core\Util\Common\Classes\Model::safeUnserialize(
                                base64_decode($setting->value)
                            );
                            if (is_array($unserialized)) {
                                ${$group_name} = $unserialized;
                            }
                        }
                    }

                    $contact_info[$group_name] = ${$group_name};
                }
        {code}

        Edit /app/controllers/client_main.php

        Replace (around line 733):
        {code:java}
                foreach ($contact_fields_groups as $group_name) {
                    if ($this->client) {
                        ${$group_name} = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if (${$group_name}) {
                            ${$group_name} = unserialize(base64_decode(${$group_name}->value));
                        }
                    }

                    $contact_info[$group_name] = ${$group_name} ?? [];
                }
        {code}

        With:
        {code:java}
                foreach ($contact_fields_groups as $group_name) {
                    ${$group_name} = [];
                    if ($this->client) {
                        $setting = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if ($setting) {
                            $unserialized = \Blesta\Core\Util\Common\Classes\Model::safeUnserialize(
                                base64_decode($setting->value)
                            );
                            if (is_array($unserialized)) {
                                ${$group_name} = $unserialized;
                            }
                        }
                    }

                    $contact_info[$group_name] = ${$group_name};
                }
        {code}

        Edit /app/controllers/client_payphp

        Replace (around line 1392):
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    if ($this->client) {
                        ${$group_name} = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if (${$group_name}) {
                            ${$group_name} = unserialize(base64_decode(${$group_name}->value));
                        }
                    }

                    $contact_info[$group_name] = ${$group_name} ?? [];
        {code}

        With:
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    ${$group_name} = [];
                    if ($this->client) {
                        $setting = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if ($setting) {
                            $unserialized = unserialize(base64_decode($setting->value));
                            if (is_array($unserialized)) {
                                ${$group_name} = $unserialized;
                            }
                        }
                    }

                    $contact_info[$group_name] = ${$group_name};
        {code}

        *For the Order plugin*

        Edit plugins/order/controllers/signup.php (around line 278).

        Replace:
        {code:java}
                // Get required contact fields
                $required_contact_fields = $this->ClientGroups->getSetting(
                    $this->client->client_group_id ?? $this->order_form->client_group_id,
                    'required_contact_fields'
                );

                if ($required_contact_fields) {
                    $required_contact_fields = unserialize(base64_decode($required_contact_fields->value));
                }

                // Get shown contact fields
                $shown_contact_fields = $this->ClientGroups->getSetting(
                    $this->client->client_group_id ?? $this->order_form->client_group_id,
                    'shown_contact_fields'
                );

                if ($shown_contact_fields) {
                    $shown_contact_fields = unserialize(base64_decode($shown_contact_fields->value));
        {code}

        with:
        {code:java}
                // Get required contact fields
                $required_contact_fields = [];
                $setting = $this->ClientGroups->getSetting(
                    $this->client->client_group_id ?? $this->order_form->client_group_id,
                    'required_contact_fields'
                );

                if ($setting) {
                    $unserialized = unserialize(base64_decode($setting->value));
                    if (is_array($unserialized)) {
                        $required_contact_fields = $unserialized;
                    }
                }

                // Get shown contact fields
                $shown_contact_fields = [];
                $setting = $this->ClientGroups->getSetting(
                    $this->client->client_group_id ?? $this->order_form->client_group_id,
                    'shown_contact_fields'
                );

                if ($setting) {
                    $unserialized = unserialize(base64_decode($setting->value));
                    if (is_array($unserialized)) {
                        $shown_contact_fields = $unserialized;
                    }
        {code}

        Around line 324:

        Replace:
        {code:java}
                $this->set('required_contact_fields', ($required_contact_fields ?? ''));
                $this->set('shown_contact_fields', ($shown_contact_fields ?? ''));
        {code}

        With:
        {code:java}
                $this->set('required_contact_fields', $required_contact_fields);
                $this->set('shown_contact_fields', $shown_contact_fields);
        {code}


        Around line: 285

        Replace:

        {code:java}
                    $unserialized = unserialize(base64_decode($setting->value));
        {code}

        with:
        {code:java}
                    $unserialized = \Blesta\Core\Util\Common\Classes\Model::safeUnserialize(
                        base64_decode($setting->value)
                    );
        {code}

        Replace Around line 299:
        {code:java}
                    $unserialized = unserialize(base64_decode($setting->value));
        {code}

        with:
        {code:java}
                   unserialized = \Blesta\Core\Util\Common\Classes\Model::safeUnserialize(
                        base64_decode($setting->value)
                    );
        {code}

        admin Paul Phillips made changes -
        Description When a client visits their "Manage Account" link it shows a white page with "Contact Information" and a Profile Picture option. The following error is written to logs:

        ==> general-error-2026-01-31.log <==
        [2026-01-31T00:28:47.885214+00:00] general.ERROR: Uncaught Exception TypeError: "in_array(): Argument #2 ($haystack) must be of type array, false given" at /home/user/public_html/app/views/client/bootstrap/client_contacts_contact_info.pdt line 45 {"exception":"[object] (TypeError(code: 0): in_array(): Argument #2 ($haystack) must be of type array, false given at /home/user/public_html/app/views/client/bootstrap/client_contacts_contact_info.pdt:45)"}

        Similar fix for
        - Adding Contacts. Contacts : Add.
        - Edit Contact
        - Make payment > Enter new Payment details (Was not able to reproduce this one though for client_pay.php)

        *Fix*
        Edit /app/controllers/client_contacts.php

        Replace (around line 466):
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    if ($this->client) {
                        ${$group_name} = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if (${$group_name}) {
                            ${$group_name} = unserialize(base64_decode(${$group_name}->value));
                        }
                    }

                    $contact_info[$group_name] = ${$group_name} ?? [];
                }
        {code}

        With:
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    ${$group_name} = [];
                    if ($this->client) {
                        $setting = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if ($setting) {
                             $unserialized = \Blesta\Core\Util\Common\Classes\Model::safeUnserialize(
                                base64_decode($setting->value)
                            );
                            if (is_array($unserialized)) {
                                ${$group_name} = $unserialized;
                            }
                        }
                    }

                    $contact_info[$group_name] = ${$group_name};
                }
        {code}

        Edit /app/controllers/client_main.php

        Replace (around line 733):
        {code:java}
                foreach ($contact_fields_groups as $group_name) {
                    if ($this->client) {
                        ${$group_name} = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if (${$group_name}) {
                            ${$group_name} = unserialize(base64_decode(${$group_name}->value));
                        }
                    }

                    $contact_info[$group_name] = ${$group_name} ?? [];
                }
        {code}

        With:
        {code:java}
                foreach ($contact_fields_groups as $group_name) {
                    ${$group_name} = [];
                    if ($this->client) {
                        $setting = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if ($setting) {
                            $unserialized = \Blesta\Core\Util\Common\Classes\Model::safeUnserialize(
                                base64_decode($setting->value)
                            );
                            if (is_array($unserialized)) {
                                ${$group_name} = $unserialized;
                            }
                        }
                    }

                    $contact_info[$group_name] = ${$group_name};
                }
        {code}

        Edit /app/controllers/client_payphp

        Replace (around line 1392):
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    if ($this->client) {
                        ${$group_name} = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if (${$group_name}) {
                            ${$group_name} = unserialize(base64_decode(${$group_name}->value));
                        }
                    }

                    $contact_info[$group_name] = ${$group_name} ?? [];
        {code}

        With:
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    ${$group_name} = [];
                    if ($this->client) {
                        $setting = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if ($setting) {
                            $unserialized = unserialize(base64_decode($setting->value));
                            if (is_array($unserialized)) {
                                ${$group_name} = $unserialized;
                            }
                        }
                    }

                    $contact_info[$group_name] = ${$group_name};
        {code}

        *For the Order plugin*

        Edit plugins/order/controllers/signup.php (around line 278).

        Replace:
        {code:java}
                // Get required contact fields
                $required_contact_fields = $this->ClientGroups->getSetting(
                    $this->client->client_group_id ?? $this->order_form->client_group_id,
                    'required_contact_fields'
                );

                if ($required_contact_fields) {
                    $required_contact_fields = unserialize(base64_decode($required_contact_fields->value));
                }

                // Get shown contact fields
                $shown_contact_fields = $this->ClientGroups->getSetting(
                    $this->client->client_group_id ?? $this->order_form->client_group_id,
                    'shown_contact_fields'
                );

                if ($shown_contact_fields) {
                    $shown_contact_fields = unserialize(base64_decode($shown_contact_fields->value));
        {code}

        with:
        {code:java}
                // Get required contact fields
                $required_contact_fields = [];
                $setting = $this->ClientGroups->getSetting(
                    $this->client->client_group_id ?? $this->order_form->client_group_id,
                    'required_contact_fields'
                );

                if ($setting) {
                    $unserialized = unserialize(base64_decode($setting->value));
                    if (is_array($unserialized)) {
                        $required_contact_fields = $unserialized;
                    }
                }

                // Get shown contact fields
                $shown_contact_fields = [];
                $setting = $this->ClientGroups->getSetting(
                    $this->client->client_group_id ?? $this->order_form->client_group_id,
                    'shown_contact_fields'
                );

                if ($setting) {
                    $unserialized = unserialize(base64_decode($setting->value));
                    if (is_array($unserialized)) {
                        $shown_contact_fields = $unserialized;
                    }
        {code}

        Around line 324:

        Replace:
        {code:java}
                $this->set('required_contact_fields', ($required_contact_fields ?? ''));
                $this->set('shown_contact_fields', ($shown_contact_fields ?? ''));
        {code}

        With:
        {code:java}
                $this->set('required_contact_fields', $required_contact_fields);
                $this->set('shown_contact_fields', $shown_contact_fields);
        {code}


        Around line: 285

        Replace:

        {code:java}
                    $unserialized = unserialize(base64_decode($setting->value));
        {code}

        with:
        {code:java}
                    $unserialized = \Blesta\Core\Util\Common\Classes\Model::safeUnserialize(
                        base64_decode($setting->value)
                    );
        {code}

        Replace Around line 299:
        {code:java}
                    $unserialized = unserialize(base64_decode($setting->value));
        {code}

        with:
        {code:java}
                   unserialized = \Blesta\Core\Util\Common\Classes\Model::safeUnserialize(
                        base64_decode($setting->value)
                    );
        {code}

        When a client visits their "Manage Account" link it shows a white page with "Contact Information" and a Profile Picture option. The following error is written to logs:

        ==> general-error-2026-01-31.log <==
        [2026-01-31T00:28:47.885214+00:00] general.ERROR: Uncaught Exception TypeError: "in_array(): Argument #2 ($haystack) must be of type array, false given" at /home/user/public_html/app/views/client/bootstrap/client_contacts_contact_info.pdt line 45 {"exception":"[object] (TypeError(code: 0): in_array(): Argument #2 ($haystack) must be of type array, false given at /home/user/public_html/app/views/client/bootstrap/client_contacts_contact_info.pdt:45)"}

        Similar fix for
        - Adding Contacts. Contacts : Add.
        - Edit Contact
        - Make payment > Enter new Payment details (Was not able to reproduce this one though for client_pay.php)

        *Fix*
        Edit /app/controllers/client_contacts.php

        Replace (around line 466):
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    if ($this->client) {
                        ${$group_name} = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if (${$group_name}) {
                            ${$group_name} = unserialize(base64_decode(${$group_name}->value));
                        }
                    }

                    $contact_info[$group_name] = ${$group_name} ?? [];
                }
        {code}

        With:
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    ${$group_name} = [];
                    if ($this->client) {
                        $setting = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if ($setting) {
                            $unserialized = \Blesta\Core\Util\Common\Classes\Model::safeUnserialize(
                                base64_decode($setting->value)
                            );
                            if (is_array($unserialized)) {
                                ${$group_name} = $unserialized;
                            }
                        }
                    }
        {code}

        Edit /app/controllers/client_main.php

        Replace (around line 733):
        {code:java}
                foreach ($contact_fields_groups as $group_name) {
                    if ($this->client) {
                        ${$group_name} = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if (${$group_name}) {
                            ${$group_name} = unserialize(base64_decode(${$group_name}->value));
                        }
                    }

                    $contact_info[$group_name] = ${$group_name} ?? [];
                }
        {code}

        With:
        {code:java}
                foreach ($contact_fields_groups as $group_name) {
                    ${$group_name} = [];
                    if ($this->client) {
                        $setting = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if ($setting) {
                            $unserialized = \Blesta\Core\Util\Common\Classes\Model::safeUnserialize(
                                base64_decode($setting->value)
                            );
                            if (is_array($unserialized)) {
                                ${$group_name} = $unserialized;
                            }
                        }
                    }

                    $contact_info[$group_name] = ${$group_name};
                }
        {code}

        Edit /app/controllers/client_payphp

        Replace (around line 1392):
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    if ($this->client) {
                        ${$group_name} = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if (${$group_name}) {
                            ${$group_name} = unserialize(base64_decode(${$group_name}->value));
                        }
                    }

                    $contact_info[$group_name] = ${$group_name} ?? [];
        {code}

        With:
        {code:java}
                // Get contact field groups
                foreach ($contact_fields_groups as $group_name) {
                    ${$group_name} = [];
                    if ($this->client) {
                        $setting = $this->ClientGroups->getSetting($this->client->client_group_id, $group_name);

                        if ($setting) {
                            $unserialized = unserialize(base64_decode($setting->value));
                            if (is_array($unserialized)) {
                                ${$group_name} = $unserialized;
                            }
                        }
                    }

                    $contact_info[$group_name] = ${$group_name};
        {code}

        *For the Order plugin*

        Edit plugins/order/controllers/signup.php (around line 278).

        Replace:
        {code:java}
                // Get required contact fields
                $required_contact_fields = $this->ClientGroups->getSetting(
                    $this->client->client_group_id ?? $this->order_form->client_group_id,
                    'required_contact_fields'
                );

                if ($required_contact_fields) {
                    $required_contact_fields = unserialize(base64_decode($required_contact_fields->value));
                }

                // Get shown contact fields
                $shown_contact_fields = $this->ClientGroups->getSetting(
                    $this->client->client_group_id ?? $this->order_form->client_group_id,
                    'shown_contact_fields'
                );

                if ($shown_contact_fields) {
                    $shown_contact_fields = unserialize(base64_decode($shown_contact_fields->value));
        {code}

        with:
        {code:java}
                // Get required contact fields
                $required_contact_fields = [];
                $setting = $this->ClientGroups->getSetting(
                    $this->client->client_group_id ?? $this->order_form->client_group_id,
                    'required_contact_fields'
                );

                if ($setting) {
                    $unserialized = unserialize(base64_decode($setting->value));
                    if (is_array($unserialized)) {
                        $required_contact_fields = $unserialized;
                    }
                }

                // Get shown contact fields
                $shown_contact_fields = [];
                $setting = $this->ClientGroups->getSetting(
                    $this->client->client_group_id ?? $this->order_form->client_group_id,
                    'shown_contact_fields'
                );

                if ($setting) {
                    $unserialized = unserialize(base64_decode($setting->value));
                    if (is_array($unserialized)) {
                        $shown_contact_fields = $unserialized;
                    }
        {code}

        Around line 324:

        Replace:
        {code:java}
                $this->set('required_contact_fields', ($required_contact_fields ?? ''));
                $this->set('shown_contact_fields', ($shown_contact_fields ?? ''));
        {code}

        With:
        {code:java}
                $this->set('required_contact_fields', $required_contact_fields);
                $this->set('shown_contact_fields', $shown_contact_fields);
        {code}


        Around line: 285

        Replace:

        {code:java}
                    $unserialized = unserialize(base64_decode($setting->value));
        {code}

        with:
        {code:java}
                    $unserialized = \Blesta\Core\Util\Common\Classes\Model::safeUnserialize(
                        base64_decode($setting->value)
                    );
        {code}

        Replace Around line 299:
        {code:java}
                    $unserialized = unserialize(base64_decode($setting->value));
        {code}

        with:
        {code:java}
                   unserialized = \Blesta\Core\Util\Common\Classes\Model::safeUnserialize(
                        base64_decode($setting->value)
                    );
        {code}

        admin Paul Phillips made changes -
        Status In Review [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            admin Paul Phillips
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Fix Release Date:
              31/Jan/26