Skip to content

Commit b24ca94

Browse files
committed
Update CreateAPITestCase.php
1 parent 47b8762 commit b24ca94

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

webfiori/framework/cli/helpers/CreateAPITestCase.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,13 @@ private function readManagerInfo() : bool {
7676
$instance = null;
7777

7878
if ($m !== null) {
79-
if (class_exists($m)) {
80-
$instance = new $m();
79+
if (class_exists($m, false)) {
80+
try {
81+
$instance = new $m();
82+
} catch (\Throwable $ex) {
83+
$this->error("The argument --manager has invalid value.");
84+
return false;
85+
}
8186

8287
if ($instance instanceof WebServicesManager) {
8388
$this->writer->setServicesManager($instance);
@@ -108,6 +113,7 @@ private function readManagerInfo() : bool {
108113
}
109114
}
110115
}
116+
return false;
111117
}
112118
private function readServiceInfo() : bool {
113119
$selected = $this->getCommand()->getArgValue('--service');

0 commit comments

Comments
 (0)