$value, "required" => TRUE, ]; // do the rewrite try { drupal_rewrite_settings($settings, $filename); } catch(Throwable $t) { throw $t; // DEBUG return FALSE; } // reset the file mode return chmod($filename, $old); } /** Sets the trusted host to the specified domain */ function set_trusted_domain(string $domain): bool { return set_setting("trusted_host_patterns", [preg_quote($domain)]); }