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.
does the function rules_condition_content_has_term() in taxonomy.rules.inc needs to handle the case where $taxonomy is an array of objects?
I just encountered this issue, and had to add the 3 lines marked with the "+" sign below.
if (!empty($vocab) && is_array($vocab)) {
foreach ($vocab as $term) {
$tid = is_object($term) ? $term->tid : (is_array($term) ? reset($term) : $term);
$tids[$tid] = $tid;
}
}
+ else if (!empty($vocab) && is_object($vocab)) {
+ $tids[$vocab->tid] = $vocab->tid;
+ }
else {
if (!empty($vocab) && is_numeric($vocab)) {
$tids[$vocab] = $vocab;
}
}
I did not see an opened bug for this, and I also checked the 6.x-1.x-dev version.
Any one else experiencing this?
Comments
Comment #1
dblais CreditAttribution: dblais commentedDuplicated i think:https://drupal.org/node/343403#comment-8313133
Comment #2
TR CreditAttribution: TR commented