FIX b2fc8092
: non trovava mai topic simili
This commit is contained in:
parent
3c819998ee
commit
ab49c7bdb1
1 changed files with 2 additions and 2 deletions
|
@ -125,8 +125,8 @@ class RelatedRorController extends ControllerBase {
|
|||
}
|
||||
|
||||
private function getSimilarity(array $orig, array $other): int {
|
||||
if(!in_array('field_tags', $orig) || count($orig['field_tags']) == 0 ||
|
||||
!in_array('field_tags', $other) || count($other['field_tags']) == 0) {
|
||||
if(!array_key_exists('field_tags', $orig) || count($orig['field_tags']) == 0 ||
|
||||
!array_key_exists('field_tags', $other) || count($other['field_tags']) == 0) {
|
||||
return 0;
|
||||
}
|
||||
$orig_tags = array_map(function($t) { return $t['target_id']; }, $orig['field_tags']);
|
||||
|
|
Loading…
Reference in a new issue