sanitize PHP setting constants for update.php

update.php encapsulates the PHP constants used by the OS default PHP error reporting level with double quotes, which breaks functionality as they are then treated as text. by turning the PHP constants into strings first this problem is avoided.
This commit is contained in:
desertwitch
2024-08-15 16:29:45 +02:00
parent 3de8e05432
commit 31f81349a8

View File

@@ -46,7 +46,7 @@ under normal running conditions.
<input type="hidden" name="log_errors" value="1">
_(Error reporting level)_:
: <select name="error_reporting" onchange="toggleScreen(this.selectedIndex)">
<?=mk_option(_var($conf,'error_reporting'), "E_ALL & ~E_NOTICE & ~E_WARNING & ~E_DEPRECATED", "_(Default)_");?>
<?=mk_option(_var($conf,'error_reporting'), strval(E_ALL & ~E_NOTICE & ~E_WARNING & ~E_DEPRECATED), "_(Default)_");?>
<?=mk_option(_var($conf,'error_reporting'), "32767", "_(All Categories)_");?>
<?=mk_option(_var($conf,'error_reporting'), "1", "_(Errors Only)_");?>
<?=mk_option(_var($conf,'error_reporting'), "2", "_(Warnings Only)_");?>