Skip to content

Updating a query results in a critical error #30

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ItsMarioSouza opened this issue May 2, 2025 · 0 comments
Open

Updating a query results in a critical error #30

ItsMarioSouza opened this issue May 2, 2025 · 0 comments

Comments

@ItsMarioSouza
Copy link
Contributor

ItsMarioSouza commented May 2, 2025

When clicking save on the GUI to update a query, a critical error is thrown, which can results in an inabiloty to upodate a query's settings can can lead to custom sorts and filters being removed.

Fatal error: Uncaught TypeError: array_map(): Argument #2 ($array) must be of type array, string given in .../plugins/query-wrangler/admin/admin.php:107

Looks like the recent updates accidentally changed qw_update_query( $_POST ); to qw_update_query( $query_id ); in admin/query-admin-pages.php. But qw_update_query( $post ) in admin/admin.php is expecting $_POST data to be passed not an ID. Refer to pull request #29 for the fix.

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

No branches or pull requests

1 participant