Skip to content

Commit ff76b25

Browse files
author
Eldar Gazaliev
committed
[ConfigController] Fixed an exception on config load
1 parent 6220835 commit ff76b25

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

Diff for: .gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1+
composer.lock
2+
vendor
13

24
/.php_cs.cache
35
.idea
4-

Diff for: src/Controller/ConfigController.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -262,11 +262,15 @@ public function getAction(Request $request): JsonResponse
262262
$name = $request->get('name');
263263

264264
$configuration = Dao::getByName($name);
265+
265266
if (empty($configuration)) {
266267
throw new Exception('Name does not exist.');
267268
}
268269

269-
if ($configuration && isset($configuration->configuration->general->executor)) {
270+
if (
271+
isset($configuration->configuration->general->executor) &&
272+
class_exists($configuration->configuration->general->executor)
273+
) {
270274
/** @var $className IExecutor */
271275
$className = $configuration->configuration->general->executor;
272276
$cli = $className::getCli($name, null);

0 commit comments

Comments
 (0)