diff --git a/plugins/personal/generic/class_UserPasswordAttribute.inc b/plugins/personal/generic/class_UserPasswordAttribute.inc
index 819218efc121d87b801b436b7e8b1ce273cbb64f..5497a0597a1ff3550ef5c5ae2378db8a6771a9ae 100755
--- a/plugins/personal/generic/class_UserPasswordAttribute.inc
+++ b/plugins/personal/generic/class_UserPasswordAttribute.inc
@@ -192,10 +192,10 @@ class UserPasswordAttribute extends CompositeAttribute
         if ($value == '%askme%') {
           return ['%askme%', '', '', $value, 'FALSE'];
         }
-        $parts = explode('|', $value, 3);
+        $parts = explode('|', (string) $value, 3);
         if ((count($parts) < 3) || !in_array($parts[1], ['TRUE','FALSE'])) {
           /* Old format from FD<1.4 */
-          list($value, $password) = explode('|', $value, 2);
+          list($value, $password) = explode('|', (string) $value, 2);
         } else {
           list($pw_storage, $locked, $password) = $parts;
           return [$pw_storage, $password, $password, $this->attributes[3]->getValue(), $locked];
diff --git a/plugins/personal/generic/class_user.inc b/plugins/personal/generic/class_user.inc
index 68cd5254431c604563a7cadf1e3c46bfbded22b8..ec2059d81596ba9191aed9c605df95d4701fb71f 100755
--- a/plugins/personal/generic/class_user.inc
+++ b/plugins/personal/generic/class_user.inc
@@ -405,7 +405,7 @@ class user extends simplePlugin
     // Get the hash of current data before modifications.
     global $config;
     $ldap            = $config->get_ldap_link();
-    $currentSnapHash = md5($ldap->generateLdif($this->dn, '(!(objectClass=gosaDepartment))', 'sub'));
+    $currentSnapHash = md5((string) $ldap->generateLdif($this->dn, '(!(objectClass=gosaDepartment))', 'sub'));
 
     // Verify if current snap hash already exist in the list of existing snapshots - not taking a snap if it exists.
     $snapshotHandler   = new SnapshotHandler();
@@ -513,7 +513,7 @@ class user extends simplePlugin
       if (isset($attrs['pwdHistory'][0])) {
         unset($attrs['pwdHistory']['count']);
         foreach ($attrs['pwdHistory'] as $pwdHistory) {
-          $pwdHistory = explode('#', $pwdHistory, 4);
+          $pwdHistory = explode('#', (string) $pwdHistory, 4);
           $method     = passwordMethod::get_method($pwdHistory[3], $user);
           if (($method !== NULL) && $method->checkPassword($new_password, $pwdHistory[3])) {
             return _('Password is in history of old passwords');
@@ -537,9 +537,9 @@ class user extends simplePlugin
       return _('The passwords you\'ve entered as "New password" and "Repeated new password" do not match.');
     } elseif ($new_password == '') {
       return msgPool::required(_('New password'));
-    } elseif ($check_differ && (mb_substr($current_password, 0, $differ) == mb_substr($new_password, 0, $differ))) {
+    } elseif ($check_differ && (mb_substr((string) $current_password, 0, $differ) == mb_substr((string) $new_password, 0, $differ))) {
       return _('The password used as new and current are too similar.');
-    } elseif ($check_length && (mb_strlen($new_password) < $length)) {
+    } elseif ($check_length && (mb_strlen((string) $new_password) < $length)) {
       return _('The password used as new is too short.');
     } elseif (!passwordMethod::is_harmless($new_password)) {
       return _('The password contains possibly problematic Unicode characters!');
diff --git a/plugins/personal/roles/class_userRoles.inc b/plugins/personal/roles/class_userRoles.inc
index 60a004e0e02f7cb7aff7a2600367195ea6b4df00..be542e137f7c336553f7f1e2ccf464505a5b63a1 100755
--- a/plugins/personal/roles/class_userRoles.inc
+++ b/plugins/personal/roles/class_userRoles.inc
@@ -214,7 +214,7 @@ class userRoles extends simplePlugin
               $warning->display();
             }
           }
-        } catch (NonExistingLdapNodeException $e) {
+        } catch (NonExistingLdapNodeException) {
           /* Ignore deleted groups */
         }
       }
@@ -241,7 +241,7 @@ class userRoles extends simplePlugin
               $warning->display();
             }
           }
-        } catch (NonExistingLdapNodeException $e) {
+        } catch (NonExistingLdapNodeException) {
           /* Ignore deleted roles */
         }
       }