-
Bug
-
Resolution: Fixed
-
Trivial
-
3.0.11
-
None
-
PHP 5.4
Steps to reproduce this behavior:
- Moderator Alice views a topic.
- Alice elects from "Quick-mod tools" the "Move topic" options.
- Alice clicks "Submit".
- In the meanwhile moderator Bob has successfully deleted the topic.
- For Alice /includes/mcp/mcp_main.php is running check_ids() which doesn't find the topic (any IDs) anymore, hence the function just returns FALSE.
- The code enters switch ($mode) and since there is no mode, Alice gets a NO_MODE error message.
However, this results in an unexpected error although we (the code) know(s) better.
To cure this I did the following in that file:
Find
trigger_error('NO_MODE', E_USER_ERROR);
|
if( $quickmod ) {
|
switch( $action ) {
|
case 'lock':
|
case 'unlock':
|
case 'make_announce':
|
case 'make_sticky':
|
case 'make_global':
|
case 'make_normal':
|
case 'make_onindex':
|
case 'move':
|
case 'fork':
|
case 'delete_topic':
|
trigger_error( 'TOPIC_NOT_EXIST' ); // no E_USER_ERROR
|
break;
|
|
case 'lock_post':
|
case 'unlock_post':
|
case 'delete_post':
|
trigger_error( 'POST_NOT_EXIST' ); // no E_USER_ERROR
|
break;
|
}
|
}
|