Skip to content

Commit

Permalink
#17 Fixing php55 fatal error.
Browse files Browse the repository at this point in the history
  • Loading branch information
hughdevore committed Aug 11, 2017
1 parent 6a1fd48 commit 2cf1b04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Type/MediaItem/Mutation/MediaItemCreate.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public static function mutate( \WP_Post_Type $post_type_object ) {
$parent = get_post( $attachment_parent_id );
$post_parent_type = get_post_type_object( $parent->post_type );
if ( ! current_user_can( $post_parent_type->cap->edit_post, $attachment_parent_id ) ) {
return new \Exception( __( 'Sorry, you are not allowed to upload mediaItems to this post', 'wp-graphql' ) );
throw new \Exception( __( 'Sorry, you are not allowed to upload mediaItems to this post', 'wp-graphql' ) );
}
}

Expand Down

0 comments on commit 2cf1b04

Please sign in to comment.