There is a bug in the code in theme.inc.

It needs to be fixed to this code below to avoid error.



function links($links, $delimiter = " | ") {

if ($links) return implode($delimiter, $links);

}



Its just a check that links contains data to explode... otherwise explode throws an error.

Comments

dries’s picture

Wouldn't it be better to figure out why we pass an empty parameter to the links() function? Maybe we should pass it an empty array rather then nothing at all.

ax’s picture

> Wouldn't it be better to figure out why we pass an empty parameter to the links() function?

we had to figure quite a lot (callers) - and again with the next cvs update. i think the parameter checking should be done in links().

> Maybe we should pass it an empty array rather then nothing at all.

empty array as default parameter wouldn't work if the caller passed some strange string. i would suggest

return is_array($links) ? implode($delimiter, $links) : "";
Anonymous’s picture

This won't be fixed, make sure you call the functions with the expected arguments.