Difference between revisions of "Template:Unique values"
From HodHood
P.Astakhov (talk | contribs) ($count[$v]['category'] = explode( ', Category:', substr( $category, 6 ) );) |
P.Astakhov (talk | contribs) ($count[$v]['category'] = $category ? explode( ', Category:', substr( $category, 6 ) ) : [];) |
||
Line 10: | Line 10: | ||
$show = "{{#show: $v | ?category |link=none }}"; | $show = "{{#show: $v | ?category |link=none }}"; | ||
$category = transclude( false, [], $show ); | $category = transclude( false, [], $show ); | ||
− | $count[$v]['category'] = explode( ', Category:', substr( $category, 6 ) ); | + | $count[$v]['category'] = ($category ? explode( ', Category:', substr( $category, 6 ) ) : []); |
} | } | ||
//$count[$v][] = $page; | //$count[$v][] = $page; |