Skip to content

Conversation

@dlh01
Copy link

@dlh01 dlh01 commented Jul 17, 2023

@getdave
Copy link
Contributor

getdave commented Aug 10, 2023

Thank you for this PR and catching those Issues. Looks like the unit tests will need updating to conform to the changes. Do you think you will be able (have capacity) to do that?

Also cc'ing @spacedmonkey as he may need to oversee this being merged into Core.

@getdave
Copy link
Contributor

getdave commented Aug 10, 2023

This will also resolve WordPress/gutenberg#52481

@dlh01
Copy link
Author

dlh01 commented Aug 10, 2023

Yep, it's on my list to update in the next week or so, I hope.

@dlh01
Copy link
Author

dlh01 commented Aug 21, 2023

@getdave Test updated!

Copy link

@anton-vlasenko anton-vlasenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes proposed in this PR fix discrepancies in how errors are handled in different situations.
LGTM (but please see #4858 (review)).

Copy link

@anton-vlasenko anton-vlasenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be changed, @dlh01.


if ( empty( $menu_items ) ) {
return array();
return '';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a BC (backward compat) issue?

tl;dr I think no.

Why?

The method shipped in 6.3.0 is clearly documented as returning a string, not an array. Returning an array then is a bug that needs to be fixed.

Co-authored-by: Tonya Mork <tonya.mork@automattic.com>
Copy link
Contributor

@hellofromtonya hellofromtonya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 Should be commit ready

@hellofromtonya
Copy link
Contributor

Committed via https://core.trac.wordpress.org/changeset/56422. Thank you everyone for your contributions!

@dlh01 dlh01 deleted the fix/classic-to-block-menu-errors branch September 9, 2024 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants