Skip to content

Commit

Permalink
correct needsUpdate when strlen (or count) = 1 which incorrectly equa… (
Browse files Browse the repository at this point in the history
#12)

* correct needsUpdate when strlen (or count) = 1 which incorrectly equaled to 'true'

* Update field.php

* Update field.php
  • Loading branch information
Ruud68 authored and laoneo committed Mar 17, 2018
1 parent 32c646f commit 2756bb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion administrator/components/com_fields/models/field.php
Expand Up @@ -590,7 +590,7 @@ public function setFieldValue($fieldId, $itemId, $value)
elseif (count($value) == 1 && count((array) $oldValue) == 1)
{
// Only a single row value update can be done when not empty
$needsUpdate = is_array($value[0]) ? !count($value[0]) : !strlen($value[0]);
$needsUpdate = is_array($value[0]) ? count($value[0]) : strlen($value[0]);
$needsDelete = !$needsUpdate;
}
else
Expand Down

0 comments on commit 2756bb8

Please sign in to comment.