Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'll have a patch for this in a few minutes.
More details: Line 1212 of includes/translation.handler.inc.
Comment | File | Size | Author |
---|---|---|---|
#7 | entity_translation_check_index-2215771-7.patch | 643 bytes | stefanos.petrakis@gmail.com |
| |||
#2 | entity_translation_check_index-2215771-2.patch | 1.03 KB | colan |
Comments
Comment #1
colanComment #2
colanPatch attached.
Comment #3
stefanos.petrakis@gmail.comSimple fix.
Comment #4
plachIf I'm not mistaken, this should be equivalent to:
This form would be more readable...
Comment #5
stefanos.petrakis@gmail.comReads better, agreed.
The value of
$translations->data[$form_langcode]['translate']
(0 or 1) should still be part of the logical conjuction, right?Comment #6
plach!empty($translations->data[$form_langcode]['translate'])
will returnTRUE
if the value is defined AND evaluates toTRUE
, while it will returnFALSE
if it's not defined OR it evaluates toFALSE
. So I think what I suggested above should be enough, although I did not test it.Comment #7
stefanos.petrakis@gmail.comAlso agreed for the definition of empty().
Re-rolling with more compact code (=> easier reading).
Setting this to 'tested' again; that was the status before this syntactical enhancement, which was checked for correctness.
Comment #9
plachCommitted and pushed, thanks!