mantisbt-plugins / Query

This plugin will enable you to define multiple queries/scripts which: 1. can be run online (by admin) 2. can be scheduled in which case results are emailed to nominated recipients
1 stars 1 forks source link

Error when running an empty query #11

Closed dregad closed 4 months ago

dregad commented 4 months ago

If you try to run an empty query, a DB error is triggered

APPLICATION ERROR 401
Database query failed. Error received from database was #0: for the query: .

Additionally, this triggers a deprecation warning

DEPRECATED: 'html_entity_decode(): Passing null to parameter #1 ($string) of type string is deprecated' in '.\Query\pages\exec_query.php' line 65

I suggest to disable the Run button if query is not valid, or at least display a more meaningful and user-friendly message.

dregad commented 4 months ago

Found while checking https://github.com/mantisbt-plugins/Query/pull/4#issuecomment-2111660815

CasN commented 4 months ago

Fixed in 2.18. This deprecation warning is on passing a null parameter which now is been taking care off.