We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
_setArgs
1 parent 199a68e commit 6119e98Copy full SHA for 6119e98
lib/api/xmlrpc/v1/xmlrpc.class.php
@@ -292,10 +292,12 @@ protected function _setArgs($args, $opt = null) {
292
$this->args = $args;
293
294
if(isset( $this->args[self::$testProjectNameParamName] ) && ! isset( $this->args[self::$testProjectIDParamName] )) {
295
- $tprojMgr = new testproject( $this->dbObj );
296
$name = trim( $this->args[self::$testProjectNameParamName] );
297
- $info = current( $this->tprojectMgr->get_by_name( $name ) );
298
- $this->args[self::$testProjectIDParamName] = $info['id'];
+ $projects = $this->tprojectMgr->get_by_name( $name );
+ if (! is_null( $projects )) {
+ $info = current( $projects );
299
+ $this->args[self::$testProjectIDParamName] = $info['id'];
300
+ }
301
}
302
303
0 commit comments