Browse Source

Default Settings: Updates for PHP 8.1

fusionate 2 years ago
parent
commit
ae6f5b2a11

+ 3 - 3
core/default_settings/default_settings_reload.php

@@ -17,7 +17,7 @@
 
  The Initial Developer of the Original Code is
  Mark J Crane <[email protected]>
- Portions created by the Initial Developer are Copyright (C) 2008-2021
+ Portions created by the Initial Developer are Copyright (C) 2008-2023
  the Initial Developer. All Rights Reserved.
 
  Contributor(s):
@@ -46,8 +46,8 @@ $language = new text;
 $text = $language->get();
 
 //set the variables
-$search = $_REQUEST['search'] ?? '';
-$domain_uuid = $_GET['id'];
+$search = $_REQUEST['search'] ?? null;
+$domain_uuid = $_GET['id'] ?? null;
 
 //reload default settings
 require "resources/classes/domains.php";

+ 1 - 1
core/default_settings/resources/classes/default_settings.php

@@ -139,7 +139,7 @@ if (!class_exists('default_settings')) {
 								$sql = "select ".$this->name."_uuid as uuid, ".$this->toggle_field." as toggle from v_".$this->table." ";
 								$sql .= "where ".$this->name."_uuid in (".implode(', ', $uuids).") ";
 								$database = new database;
-								$rows = $database->select($sql, $parameters, 'all');
+								$rows = $database->select($sql, $parameters ?? null, 'all');
 								if (is_array($rows) && @sizeof($rows) != 0) {
 									foreach ($rows as $row) {
 										$states[$row['uuid']] = $row['toggle'];