mishrsud / mvc-mini-profiler

Automatically exported from code.google.com/p/mvc-mini-profiler
0 stars 0 forks source link

SqlTiming.GetCommandParameters can throw a NullReferenceException #56

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a DbCommand object with a null parameter (null, not DBNull).
2. Add a SqlTiming to the profiler using the DbCommand with the null param

What is the expected output? What do you see instead?
The SqlTimingParamterValue should be null but instead a NRE is thrown.

Message : Object reference not set to an instance of an object. 
StackTrace : at MvcMiniProfiler.SqlTiming.GetCommandParameters(DbCommand 
command) in SqlTiming.cs: line 208 
at MvcMiniProfiler.SqlTiming..ctor(DbCommand command, ExecuteType type, 
MiniProfiler profiler) in SqlTiming.cs: line 132 

What version of the product are you using? On what operating system?
latest from HG

Please provide any additional information below.

Original issue reported on code.google.com by neal.sh...@gmail.com on 13 Jul 2011 at 2:53

GoogleCodeExporter commented 8 years ago
Fixed the issue in this change. 
http://code.google.com/r/nealshawn-mvc-mini-profiler-defect56/source/detail?r=43
2c263b5c3dbdd86df30279d7458ee1c3bce05d

Original comment by neal.sh...@gmail.com on 13 Jul 2011 at 10:54

GoogleCodeExporter commented 8 years ago
pulled this in ... thanks ! 

Original comment by sam.saff...@gmail.com on 19 Jul 2011 at 4:19

GoogleCodeExporter commented 8 years ago

Original comment by sam.saff...@gmail.com on 19 Jul 2011 at 4:20