Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-01-27 18:01:19

wet
Developer Emeritus
From: Vöcklabruck, Austria
Registered: 2005-06-06
Posts: 3,391
Website GitHub Mastodon

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

r2238

Offline

#3 2007-01-28 07:01:04

wet
Developer Emeritus
From: Vöcklabruck, Austria
Registered: 2005-06-06
Posts: 3,391
Website GitHub Mastodon

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

Board footer

Powered by FluxBB