Skip to content

Commit

Permalink
Applying patch from http://bugs.movabletype.org/?80960 to give develo…
Browse files Browse the repository at this point in the history
…pers feedback in the case of malformed or missing page actions.
  • Loading branch information
jayallen committed Mar 12, 2009
1 parent ea6453f commit beed9e0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/MT/App.pm
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,14 @@ sub page_actions {
my ( $type, @param ) = @_;
my $actions = $app->registry( "page_actions", $type ) or return;
foreach my $a ( keys %$actions ) {
# The change below relates to http://bugs.movabletype.org/?80960
if ('HASH' ne ref($actions->{$a})||'') {
MT->log({ # Developer debug message...
message => MT->translate('Malformed page_action data found for mode "[_1]" (Key: [_2]). Skipping page_actions.', $type, $a),
level => MT::Log::ERROR(),
});
return;
}
$actions->{$a}{key} = $a;
__massage_page_action( $app, $actions->{$a}, $type );
}
Expand Down

0 comments on commit beed9e0

Please sign in to comment.