Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't throw error when using db_fetch_array on empty resultset
When you execute a query which returns no results, an error is thrown when using db_fetch_array() on it, because the method tries to access the EOF property of an object which in that case is null. By adding an extra check on the passed p_result to see whether it is null, you can safely use db_fetch_array for instance in while loops, without having to always manually check whether or not the result has rows. This makes code more readable and faster. Fixes #14336 Signed-off-by: Damien Regad <damien.regad@merckgroup.com>
- Loading branch information