Skip to content

Commit cc06e4a

Browse files
committed
Merge pull request #132 from F21/fix_aql_functions_bug
Fixed AQL user function's register() not using supplied arguments.
2 parents eeb39f7 + 5e780c1 commit cc06e4a

File tree

2 files changed

+269
-236
lines changed

2 files changed

+269
-236
lines changed

lib/triagens/ArangoDb/AqlUserFunction.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,12 @@ public function register($name = null, $code = null)
120120
$attributes = $this->attributes;
121121

122122

123-
if (is_null($name)) {
124-
$attributes['name'] = $this->getName();
123+
if ($name) {
124+
$attributes['name'] = $name;
125125
}
126-
if (is_null($code)) {
127-
$attributes['code'] = $this->getCode();
126+
127+
if ($code) {
128+
$attributes['code'] = $code;
128129
}
129130

130131
$response = $this->_connection->post(

0 commit comments

Comments
 (0)