Closed (outdated)
Project:
Rules
Version:
6.x-1.5
Component:
Rules Core
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Jan 2013 at 22:23 UTC
Updated:
4 Jun 2018 at 02:51 UTC
Jump to comment: Most recent
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 commentedDuplicated i think:https://drupal.org/node/343403#comment-8313133
Comment #2
tr commented