Browse Source

Empty Strings Don't Need Cleanup

PHP 8.1 is a real stickler about this.
Andy 3 years ago
parent
commit
474f469a4a
1 changed files with 2 additions and 1 deletions
  1. 2 1
      include/init.php

+ 2 - 1
include/init.php

@@ -520,7 +520,8 @@ switch (PAGE_NAME) {
 
         // sanitize just in case...
         //
-        $templateid = preg_replace('/(\.\.\/){1,}/', '', $templateid);
+        if (!empty($templateid))
+            $templateid = preg_replace('/(\.\.\/){1,}/', '', $templateid);
 
         // make sure given template actually is available
         //