Browse code

modules/challenges/challenges.php: fix Undefined constant PHP 8.x error message due to the fact that it was missing the language file includes

Clarissa Walker authored on 2026/11/03 14:23:14
Showing 1 changed files
... ...
@@ -24,6 +24,8 @@
24 24
 $current = "challenges";
25 25
 if(isset($_GET['action']) && ($_GET['action'] == "add" || $_GET['action'] == "edit")) $displayform = 1;
26 26
 include ("../../header.php");
27
+if(file_exists(_BASEDIR."modules/challenges/languages/{$language}.php")) require_once (_BASEDIR."modules/challenges/languages/{$language}.php");
28
+else require_once (_BASEDIR."languages/en.php");
27 29
 
28 30
 //make a new TemplatePower object
29 31
 if(file_exists( "$skindir/default.tpl")) $tpl = new TemplatePower("$skindir/default.tpl" );