File: 1007_fix_debugLevel_bitwise_and.patch

package info (click to toggle)
gosa 2.8~git20230203.10abe45%2Bdfsg-19
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 33,108 kB
  • sloc: php: 32,102; javascript: 10,836; pascal: 3,776; xml: 3,135; sh: 852; python: 162; makefile: 45; perl: 2
file content (11 lines) | stat: -rw-r--r-- 421 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
--- a/include/functions.inc
+++ b/include/functions.inc
@@ -246,7 +246,7 @@
     if($config instanceOf config){
         $debugLevel = $config->get_cfg_value('core', 'debugLevel');
     }
-    if ($debugLevel && $level){
+    if (intval($debugLevel) & $level){ // Make bitwise AND operation.
         $output= "DEBUG[$level] ";
         if ($function != ""){
             $output.= "($file:$function():$line) - $info: ";