diff --git a/app/Http/Requests/SettingsSamlRequest.php b/app/Http/Requests/SettingsSamlRequest.php index 8f02d64f0..2ab876141 100644 --- a/app/Http/Requests/SettingsSamlRequest.php +++ b/app/Http/Requests/SettingsSamlRequest.php @@ -62,7 +62,7 @@ class SettingsSamlRequest extends FormRequest $custom_privateKey = ''; $custom_x509certNew = ''; if (! empty($this->input('saml_custom_settings'))) { - $req_custom_settings = preg_split('/\r\n|\r|\n/', $this->input('saml_custom_settings')); + $req_custom_settings = preg_split('/\r\n|\r|\n/', $this->input('saml_custom_settings', '')); $custom_settings = []; foreach ($req_custom_settings as $custom_setting) { diff --git a/app/Models/CustomField.php b/app/Models/CustomField.php index dfa497136..81eff9b4c 100644 --- a/app/Models/CustomField.php +++ b/app/Models/CustomField.php @@ -307,7 +307,7 @@ class CustomField extends Model public function formatFieldValuesAsArray() { $result = []; - $arr = preg_split('/\\r\\n|\\r|\\n/', $this->field_values); + $arr = preg_split('/\\r\\n|\\r|\\n/', $this->field_values ?? ''); if (($this->element != 'checkbox') && ($this->element != 'radio')) { $result[''] = 'Select '.strtolower($this->format); diff --git a/app/Services/Saml.php b/app/Services/Saml.php index 860ec7617..222c2c2ea 100644 --- a/app/Services/Saml.php +++ b/app/Services/Saml.php @@ -209,7 +209,7 @@ class Saml } } - $custom_settings = preg_split('/\r\n|\r|\n/', $setting->saml_custom_settings); + $custom_settings = preg_split('/\r\n|\r|\n/', $setting->saml_custom_settings ?? ''); if ($custom_settings) { foreach ($custom_settings as $custom_setting) { $split = explode('=', $custom_setting, 2);