Small bug found in categories.php
-
Hi,
I was trying the remove a category when I got an error message saying that it was the default one….Wrong !
So I investigate and here is my findings :
$default_category = get_settings(‘default_category’);
Around line 67 in “categories.php” :
if (1 == $cat_ID)
die("Can't delete the $cat_name category: this is the default one");
instead of
if ($default_category == $cat_ID)
die("Can't delete the $cat_name category: this is the default one");
and few lines below :
$wpdb->query("UPDATE $tablepost2cat SET category_id='1' WHERE category_id='$cat_ID'");
instead of
$wpdb->query("UPDATE $tablepost2cat SET category_id='$default_category' WHERE category_id='$cat_ID'");
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Small bug found in categories.php’ is closed to new replies.