Fix "undefined index notice"

Lines 448/449 caused problems when WP is running in debug mode. As a result, adding categories was not working properly.