Skip to content

Commit f7d0dbb

Browse files
authored
Merge pull request #207 from VyseExhale/patch-1
Possible fix for issue 206
2 parents 9039cb6 + c6d79bb commit f7d0dbb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

api.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2636,6 +2636,14 @@ public function executeCommand() {
26362636
$this->swagger($this->settings);
26372637
} else {
26382638
$parameters = $this->getParameters($this->settings);
2639+
if ($parameters['before']) {
2640+
if (count($parameters['inputs']) == 0) {
2641+
for($i=1; $i <= count(explode(',', $parameters['key'][0])); $i++) {
2642+
$parameters['inputs'][] = new stdClass();
2643+
}
2644+
}
2645+
$this->applyBeforeHandler($parameters['action'], $parameters['database'],$parameters['tables'][0],$parameters['key'][0],$parameters['before'],$parameters['inputs']);
2646+
}
26392647
switch($parameters['action']){
26402648
case 'list': $output = $this->listCommand($parameters); break;
26412649
case 'read': $output = $this->readCommand($parameters); break;

0 commit comments

Comments
 (0)