Commit e8421fdc authored by Sebastian Kummer's avatar Sebastian Kummer

Merge pull request #239 in ZP/z-push from...

Merge pull request #239 in ZP/z-push from bugfix/ZP-905-kopanochangeswrapper-and-other-new1 to develop

* commit 'd1d2e98f':
  ZP-905 Assign intersect result to variables before checking it with empty().
parents 0449fa9e d1d2e98f
......@@ -127,10 +127,9 @@ class SyncNote extends SyncObject {
// is a color other than yellow set
if (isset($this->Color) && $this->Color != 3 && $this->Color > -1 && $this->Color < 5) {
// check existing categories - do not rewrite category if the category is already a supported or unsupported color
if (!empty($this->categories) &&
(!empty(array_intersect($this->categories, array_values(self::$unsupportedColors))) ||
!empty(array_intersect($this->categories, array_values(self::$colors))) )) {
$insecUnsupp = array_intersect($this->categories, array_values(self::$unsupportedColors));
$insecColors = array_intersect($this->categories, array_values(self::$colors));
if (!empty($this->categories) && (!empty($insecUnsupp) || !empty($insecColors))) {
return false;
}
if(!isset($this->categories)) {
......
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