From 453e0da077e03efcec6afdbd1057e388d48dc800 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Tue, 21 Feb 2017 19:57:50 +0100 Subject: [PATCH] #185 make comparing attribute values more strict --- lam/lib/modules.inc | 6 +++--- lam/tmp/.gitignore | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 lam/tmp/.gitignore diff --git a/lam/lib/modules.inc b/lam/lib/modules.inc index 7357b07b..ae7a394b 100644 --- a/lam/lib/modules.inc +++ b/lam/lib/modules.inc @@ -1496,7 +1496,7 @@ class accountContainer { if (isset($orig[$name]) && is_array($orig[$name])) { foreach ($orig[$name] as $j => $value) { if (is_array($attributes[$name])) { - if (!in_array($value, $attributes[$name])) { + if (!in_array($value, $attributes[$name], true)) { if ($value != '') $torem[$name][] = $value; } } @@ -1507,7 +1507,7 @@ class accountContainer { if (isset($attributes[$name]) && is_array($attributes[$name])) { foreach ($attributes[$name] as $j => $value) { if (isset($orig[$name]) && is_array($orig[$name])) { - if (!in_array($value, $orig[$name])) + if (!in_array($value, $orig[$name], true)) if ($value != '') { $toadd[$name][] = $value; } @@ -1518,7 +1518,7 @@ class accountContainer { // find unchanged attributes if (isset($orig[$name]) && is_array($orig[$name]) && is_array($attributes[$name])) { foreach ($attributes[$name] as $j => $value) { - if (($value != '') && in_array($value, $orig[$name])) { + if (($value != '') && in_array($value, $orig[$name], true)) { $notchanged[$name][] = $value; } } diff --git a/lam/tmp/.gitignore b/lam/tmp/.gitignore new file mode 100644 index 00000000..66b83c12 --- /dev/null +++ b/lam/tmp/.gitignore @@ -0,0 +1 @@ +/*.jpg