taskeenkayani / ext-direct-mvc

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

null reference error in DirectMethodInvoker #1

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
DirectMethodInvoker, if data from the client is empty (json is ..data:[]..) 
and the method expects a parameter a null reference error is raised..

                object[] data = directRequest.Data;
-->> Add if (data != null){
                for (int i = 0; i < parameterDescriptors.Length; i++) {
                    object rawValue = data[i];
..
}

Original issue reported on code.google.com by marco.di...@gmail.com on 21 Jan 2010 at 10:17

GoogleCodeExporter commented 8 years ago
Number of arguments passed from the client must be equal to the number of 
parameters
defined on the server, otherwise I throw an exception. However, I wasn't 
checking
Direct request data for null, so I added it. Check our r36.

Original comment by elishnevsky on 24 Jan 2010 at 5:19