diff --git a/lib/api/xmlrpc/v1/xmlrpc.class.php b/lib/api/xmlrpc/v1/xmlrpc.class.php index 2e356b5b9e..8a7f0593c2 100644 --- a/lib/api/xmlrpc/v1/xmlrpc.class.php +++ b/lib/api/xmlrpc/v1/xmlrpc.class.php @@ -292,10 +292,12 @@ protected function _setArgs($args, $opt = null) { $this->args = $args; if(isset( $this->args[self::$testProjectNameParamName] ) && ! isset( $this->args[self::$testProjectIDParamName] )) { - $tprojMgr = new testproject( $this->dbObj ); $name = trim( $this->args[self::$testProjectNameParamName] ); - $info = current( $this->tprojectMgr->get_by_name( $name ) ); - $this->args[self::$testProjectIDParamName] = $info['id']; + $projects = $this->tprojectMgr->get_by_name( $name ); + if (! is_null( $projects )) { + $info = current( $projects ); + $this->args[self::$testProjectIDParamName] = $info['id']; + } } }