Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

refactor(remoteProcess): update sanitize_utf8_text function to accept nullable string parameter for improved type safety

Andras Bacsai81d6cb539b6a
diff --git a/bootstrap/helpers/remoteProcess.php b/bootstrap/helpers/remoteProcess.php
index 986a08e174..6c1e2beabb 100644
--- a/bootstrap/helpers/remoteProcess.php
+++ b/bootstrap/helpers/remoteProcess.php
@@ -252,7 +252,7 @@ function remove_iip($text)
* @param string|null $text The text to sanitize
* @return string Valid UTF-8 encoded text
*/
-function sanitize_utf8_text($text): string
+function sanitize_utf8_text(?string $text): string
{
if (empty($text)) {
return '';