Observant readers will have noticed my “mood” thingies at the top of each post. I use a nifty little plugin called Cricket Moods for this, as it does all I need in a nicely well-behaved manner. Unless you fiddle about a bit, it points at the folder where your existing WordPress smilies live. You can then select which smilies you wish to associate with a mood, and add a label describing the mood in question. Or you could it for anything else, really.
Anyway, it’s always played nicely until yesterday, when I decided to add my latest smiley to the mood list:  I added it to the main page, but this didn’t make it available in my posting screen. After a bit of head-scratching, I eventually remembered that the plugin keeps a separate list of moods for each user, and that even though I’m the only user on this site, I needed to add the extra mood on my personal page. Well, I did that, clicked the “update” button, and oooooooops. I was presented with a nasty error message
Warning: ksort() expects parameter 1 to be array, string given in
/wp-content/plugins/cricket-moods.php on line 615
Warning: Invalid argument supplied for foreach() in
/wp-content/plugins/cricket-moods.php on line 616
I had a quick look at those lines in the plugin and was immediately reminded that I am not a coder. Obviously something was broken, but I had no idea what. After some random searching, I eventually found this post on the author’s site, in which he noted that he was aware that there was a problem, and that he’d fix it as soon as he could. OK, I was relieved that it wasn’t just my site being broken, but I really wanted to make the error go away.
Knowing that I had a good backup of my WordPress database, I took phpMyAdmin in my hands, and had a look at the
wp_usermeta table, where I found two fields which seemed to refer to my personal user settings for Cricket Moods. I deleted the two fields, which made my personal settings revert to the standard ones. Which meant I could continue to use my moods in new posts. . This was only a work-around, and it wouldn’t work for anyone with multiple users, as they might find all their old moods scrambled.
Anyway, despite being away and having to use a dial-up connection , the author has published a new version of Cricket Moods which doesn’t suffer from this problem. It seems the problem was caused by a code change in WordPress 2.0.5, which is why it’s only recently come to light.
Another example of open source stuff working as it should.
 Except the ones where I forget
 Thanks, Twisty!
 “Don’t do that, you’ll get splinters”
 It’s safer that way…
 Quite apart from whatever Dreamhost do, I have a daily backup of my database automagically emailed to me