camptocamp/cgxp — pull request #195 by asaunier (2012-08-21 11:36:50+00:00)
Title: Fix a bug when no layer is detected while making a WFS GetFeature

As for now when the current background layer has no "mapserverLayers" param, the WFSGetFeature plugin fails when trying to execute
```
layers = layers.split(',');
```
because "layers" is undefined.
This PR suggests to add a check to ignore the layer when no mapserver layers info are detected.

Please note however that one could get such info using
```
var layers = layer.params.LAYERS || layer.mapserverLayers || layer.layer;
```
instead of
```
var layers = layer.params.LAYERS || layer.mapserverLayers;
```
but I am not sure it is really relevent, for instance if we don't want to query a raster background layer.