PHP Fatal error: Uncaught Exception: Unknown parameter IN.
-
After the last update (version 2.4.2), there is a fatal error in the plugin. Doind a diff between the previous and the current version, I see a new if..then..else block has been added in the /includes/Core/Database.php file, inside the method get_where_query( $wheres ).
Here, you check the given WHERE clauses and, when the $compare value is “IN”, you expect an array for the compare. Unfortunately, it is a string and this makes the check fail. Since there are no more options for the value, an Exception is thrown.
Doing some debugging, I see that the value used for the “IN” (in my case it’s a single value, not a list, so I don’t know whether in that case it would behave correctly), is “(32345)” (yes, with brackets). This of course is not right as it should be an array with a single value “32345”.
I inserted a temporaneous fix (which I’m almost certain would work only for my installation), but I open a topic here so that you can correct the behaviour (I suspect, given those brackets in the value, that the error is in the code that invokes this method, but I think there should be an option where, after checking that the $compare is a “IN”, the second parameter gets (if needed) converted to an array – and those brackets removed, of course).
Thank you
- The topic ‘PHP Fatal error: Uncaught Exception: Unknown parameter IN.’ is closed to new replies.