work around WP bug #11112

This commit is contained in:
John Bintz 2009-11-09 22:42:30 -05:00
parent e4607f4445
commit 92fd202c1d
1 changed files with 2 additions and 1 deletions

View File

@ -30,8 +30,9 @@ function cpm_action_build_storyline_schema() {
$parts = explode("/", $field); $parts = explode("/", $field);
if (($parts[0] == "0") && (count($parts) > 1)) { if (($parts[0] == "0") && (count($parts) > 1)) {
$category_id = end($parts); $category_id = end($parts);
$category = get_category($category_id, ARRAY_A); $category = get_category($category_id);
if (!empty($category)) { if (!empty($category)) {
$category = (array)$category;
if ($category['cat_name'] != $value) { if ($category['cat_name'] != $value) {
$cpm_config->messages[] = sprintf(__('Category <strong>%1$s</strong> renamed to <strong>%2$s</strong>.', 'comicpress-manager'), $category['cat_name'], $value); $cpm_config->messages[] = sprintf(__('Category <strong>%1$s</strong> renamed to <strong>%2$s</strong>.', 'comicpress-manager'), $category['cat_name'], $value);
$category['cat_name'] = $value; $category['cat_name'] = $value;