Commit 7d157863 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

Merge branch...

Merge branch '6063-argument-4-passed-to-dhcphostsattribute-postldapsave-must-be-of-the-type-array-string-given' into '1.3-fixes'

Resolve "Argument 4 passed to DhcpHostsAttribute::postLdapSave() must be of the type array, string given"

See merge request fusiondirectory/fd-plugins!749
parents 1cb880ab 7ae44c39
......@@ -156,10 +156,23 @@ class DhcpHostsAttribute extends OrderedArrayAttribute
}
/* Special LDAP treatment that this attribute does after plugin ldap save */
function postLdapSave ($ldap, $fullrewrite, $ipchanged, array $oldips, array $newips, $macchanged, array $oldmacs, array $newmacs)
function postLdapSave ($ldap, $fullrewrite, $ipchanged, $oldips, $newips, $macchanged, $oldmacs, $newmacs)
{
global $config, $ui;
if (!is_array($oldips)) {
$oldips = [$oldips];
}
if (!is_array($newips)) {
$newips = [$newips];
}
if (!is_array($oldmacs)) {
$oldmacs = [$oldmacs];
}
if (!is_array($newmacs)) {
$newmacs = [$newmacs];
}
if ($this->plugin->is_template) {
return;
}
......
  • SonarQube analysis reported 3 issues

    • 3 major

    Note: The following issues were found on lines that were not modified in the commit. Because these issues can't be reported as line comments, they are summarized here:

    1. This function "getAttributesInfo" has 175 lines, which is greater than the 150 lines authorized. Split it into smaller functions. 📘
    2. This function "getUserValues" has 206 lines, which is greater than the 150 lines authorized. Split it into smaller functions. 📘
    3. Remove this unused "$class" local variable. 📘
  • mentioned in commit 19b273eb

    Toggle commit list
  • SonarQube analysis reported 3 issues

    • 3 major

    Note: The following issues were found on lines that were not modified in the commit. Because these issues can't be reported as line comments, they are summarized here:

    1. This function "getAttributesInfo" has 175 lines, which is greater than the 150 lines authorized. Split it into smaller functions. 📘
    2. This function "getUserValues" has 206 lines, which is greater than the 150 lines authorized. Split it into smaller functions. 📘
    3. Remove this unused "$class" local variable. 📘
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment