fluentpdo icon indicating copy to clipboard operation
fluentpdo copied to clipboard

Fatal error when perform getExecutionTime()

Open CrazyPHP opened this issue 7 years ago • 2 comments

If there was error during query execution for example select of non existing coloumn, then calling of method getExecutionTime() will throw a fatal error: "Base::getExecutionTime() must be of the type float, null returned in ...\vendor\envms\fluentpdo\src\Queries\Base.php:322".

Is it normal? May it will be good to return 0 or null instead of Fatal Error. Or maybe delete this hard returning public function getExecutionTime(): float

CrazyPHP avatar Nov 04 '18 20:11 CrazyPHP

Sorry, I didn't see this issue submitted before. I'll definitely look into it!

You're getting this error only when a query fails, correct?

cbornhoft avatar Nov 13 '18 13:11 cbornhoft

You're getting this error only when a query fails, correct?

Yes.

CrazyPHP avatar Nov 13 '18 17:11 CrazyPHP