Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
r2237: if_article_category is still a bit screwy
Given the case an article is assigned to no category at all, $cats is
array (
0 => '',
)
caused by the initialisation with
2637: $cats = array();
which evaluates to TRUE, this in turn causes
2651: return parse(EvalElse($thing, ($cats)));
to act quite unintentional.
Offline
#2 2007-01-27 21:09:40
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: r2237: if_article_category is still a bit screwy
Given the case an article is assigned to no category at all…
You know, I was just thinking about that one. Thanks for catching it. Ironically, I had wanted to fix it because it was saying there were no categories when there were…
Offline
Re: r2237: if_article_category is still a bit screwy
Thanks, Mary.
I had in fact wondered for a long time – and never understood – how the previous code with array_shift was intended to work, so I paid due attention to this changeset.
Offline