I'm having a weird situation where wp_create_category fails inexplicably. I have three lines:
zenpress_debug_log("Before wp_create_category for " . $upload_story["data"]["category"]); $category_id = wp_create_category($upload_story["data"]["category"]); zenpress_debug_log("After wp_create_category, category id: " . $category_id);
The first line writes "Before wp_create_category for Lotus Sametime" to my logfile.
But the second log statement is never written, which seems to imply that the program crashes in the wp_create category statement.
The only other unusual aspect if this is I'm calling this function from a wget, not a web page, and I'm using switch_to_blog to tell WP which blog in my MU installation to work with. However, all indications are that all of that work, because all my debugging statements prior to this one work just fine.
So any idea why wp_create_category would fail? Oh, I checked and the only category currently in this blog is the default category. Nothing else has been created yet.