diff --git a/html/progress.php b/html/progress.php
index f8e908c629e7488afd33630b4e262fc97ac3c8f6..c133b48b49912f3efe9514cf39cc1e6750ebbcf6 100644
--- a/html/progress.php
+++ b/html/progress.php
@@ -75,8 +75,10 @@ if (!function_exists("imagecreate")) {
   }
 
   /* Draw image in GD image stream */
-  $im = imagecreate ($x, $y)
-    or die ("Cannot Initialize new GD image stream");
+  $im = imagecreate ($x, $y);
+  if (!$im) {
+    die ('Cannot Initialize new GD image stream');
+  }
 
   /* Set colors */
   $bg_color = imagecolorallocate($im, 255,  255,  255);
diff --git a/include/class_ldap.inc b/include/class_ldap.inc
index 66e2cbde9cbccdc9db04c11e38446a57fc988740..9bf4af49d6ac775e604735f099e98e0e9a8daf34 100644
--- a/include/class_ldap.inc
+++ b/include/class_ldap.inc
@@ -576,8 +576,9 @@ class LDAP
         $this->connect();
       }
 
-      if ($dn == "")
+      if ($dn == "") {
         $dn = $this->basedn;
+      }
 
       $r = ldap_mod_del($this->cid, LDAP::fix($dn), $attrs);
       $this->error = @ldap_error($this->cid);
@@ -595,8 +596,9 @@ class LDAP
         $this->connect();
       }
 
-      if ($dn == "")
+      if ($dn == "") {
         $dn = $this->basedn;
+      }
 
       $r = @ldap_mod_add($this->cid, LDAP::fix($dn), $attrs);
       $this->error = @ldap_error($this->cid);
diff --git a/include/class_management.inc b/include/class_management.inc
index c109b54c1e7aa60a8570f50484ee5fc28dfa14af..dd372dee0c7564495660f1c9c609fb1abf9719c3 100644
--- a/include/class_management.inc
+++ b/include/class_management.inc
@@ -380,12 +380,15 @@ class management
     $tabClass     = $this->tabClass;
     $aclCategory  = $this->aclCategory;
 
-    if (!empty($altTabClass))
+    if (!empty($altTabClass)) {
       $tabClass = $altTabClass;
-    if (!empty($altTabType))
+    }
+    if (!empty($altTabType)) {
       $tabType = $altTabType;
-    if (!empty($altAclCategory))
+    }
+    if (!empty($altAclCategory)) {
       $aclCategory = $altAclCategory;
+    }
 
     @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, $target, "Entry removal confirmed!");
 
diff --git a/include/functions_debug.inc b/include/functions_debug.inc
index 709a9711af9254ffbd13b4a0a4169a349ab81c5b..fe6b5092aae40163a11ea7eeb30860d9efef8b62 100644
--- a/include/functions_debug.inc
+++ b/include/functions_debug.inc
@@ -112,7 +112,9 @@ class Print_a_class {
    */
   function print_a($array, $iteration = FALSE, $key_bg_color = FALSE)
   {
-    $key_bg_color or $key_bg_color = $this->key_bg_color;
+    if (!$key_bg_color) {
+      $key_bg_color = $this->key_bg_color;
+    }
 
     if (!$iteration && isset($this->export_flag)) {
       $this->output .= '<form id="pa_form_'.$this->export_hash.'" action="'.$this->export_dumper_path.'?mode='.$this->export_flag.'" method="post" target="_blank"><input name="array" type="hidden" value="'.htmlspecialchars( serialize( $array ) ).'"></form>';
@@ -123,8 +125,13 @@ class Print_a_class {
       for ($i = 0; $i < 6; $i += 2) {
         $c = substr( $key_bg_color, $i, 2 );
         $c = hexdec( $c );
-        ( $c += 15 ) > 255 and $c = 255;
-        isset($tmp_key_bg_color) or $tmp_key_bg_color = '';
+        $c += 15;
+        if ($c > 255) {
+          $c = 255;
+        }
+        if (!isset($tmp_key_bg_color)) {
+          $tmp_key_bg_color = '';
+        }
         $tmp_key_bg_color .= sprintf( "%02X", $c );
       }
       $key_bg_color = $tmp_key_bg_color;
@@ -221,7 +228,7 @@ class Print_a_class {
 function print_a($array, $return_mode = FALSE, $show_object_vars = FALSE, $export_flag = FALSE )
 {
   $e = error_reporting(0);
-  if (is_array($array) or is_object($array)) {
+  if (is_array($array) || is_object($array)) {
     $pa = new Print_a_class;
     if ($show_object_vars) {
       $pa->show_object_vars = TRUE;