Skip to content

Commit 392822e

Browse files
committed
Merge pull request #52 from developer-devPHP/master
Fixes issue if we have allows_only_fields_in_filter param in zf-conte…
2 parents dc82056 + cd8de5e commit 392822e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/ApiFactory.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,10 +204,12 @@ public function createService(Api $api, $serviceName)
204204
$fields = [];
205205
if (isset($this->config['zf-content-validation'][$serviceClassName])) {
206206
foreach ($this->config['zf-content-validation'][$serviceClassName] as $validatorKey => $validatorName) {
207-
foreach ($this->mapFields($this->config['input_filter_specs'][$validatorName]) as $fieldData) {
208-
$fields[$validatorKey][] = $this->getField($fieldData);
207+
if (isset($this->config['input_filter_specs'][$validatorName])) {
208+
foreach ($this->mapFields($this->config['input_filter_specs'][$validatorName]) as $fieldData) {
209+
$fields[$validatorKey][] = $this->getField($fieldData);
210+
}
211+
$hasFields = true;
209212
}
210-
$hasFields = true;
211213
}
212214
}
213215

0 commit comments

Comments
 (0)