OK, I initially thought that this was a widget problem but it turns out to be a problem with one particular site installation.
No matter whether I use the above code get_category($cat) it keeps returning null, where as the other sites are fine.
Can anybody advise why this would happen – is it a themes problem ?
Have alerady replace all the wordpress files with a fresh download upgrade copy so it has to be a theme, settings and plugin problem.