Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

Commit

Permalink
Change error name.
Browse files Browse the repository at this point in the history
Co-Authored-By: Timothy Jacobs <[email protected]>
  • Loading branch information
spacedmonkey and TimothyBJacobs authored Feb 11, 2020
1 parent e0a4b26 commit 439be5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/class-wp-rest-menus-controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ protected function handle_locations( $menu_id, $request ) {
$new_locations = array();
foreach ( $request['locations'] as $location ) {
if ( ! in_array( $location, $menu_locations, true ) ) {
return new WP_Error( 'check_assign_locations_permission', __( 'Menu location does not exist.' ), array( 'status' => 400 ) );
return new WP_Error( 'invalid_menu_location', __( 'Menu location does not exist.' ), array( 'status' => 400 ) );
}
$new_locations[ $location ] = $menu_id;
}
Expand Down

0 comments on commit 439be5d

Please sign in to comment.