Skip to content

Commit

Permalink
Fixing misnamed variable (#1875)
Browse files Browse the repository at this point in the history
This variable referenced one that did not exist, this would have caused
a runtime error if called.
  • Loading branch information
ryanrath authored Jun 26, 2024
1 parent bad40a7 commit 3964cb3
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion classes/DB/PDODBMultiIngestor.php
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ protected function getCommonProcessingStatements($configFilePath)
protected function loadProcessingConfig($configFilePath)
{
if (! is_file($configFilePath)) {
throw new Exception("'$configPath' is missing. If no processing is needed, use an empty array.");
throw new Exception("'$configFilePath' is missing. If no processing is needed, use an empty array.");
}

$configFileContents = @file_get_contents($configFilePath);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ public function __construct(
$endDate,
$groupById = null,
$statisticId = null,
array $parameters = array()
array $parameters = array(),
LoggerInterface $logger = null
) {
$realmId = 'ResourceSpecifications';
$schema = 'modw_aggregates';
Expand All @@ -36,7 +37,8 @@ public function __construct(
$endDate,
$groupById,
$statisticId,
$parameters
$parameters,
$logger
);

$this->setDistinct(true);
Expand Down
2 changes: 1 addition & 1 deletion classes/OpenXdmod/Shredder/Pbs.php
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ public function getJobId($id)
} elseif (preg_match('/^\d+$/', $sequence, $matches)) {
$jobId = $sequence;
} else {
$this->logger->warning("Unknown id_string format: '$id_string'");
$this->logger->warning("Unknown id_string format: '$id'");
$jobId = $sequence;
}

Expand Down
10 changes: 5 additions & 5 deletions classes/Rest/Controllers/MetricExplorerControllerProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public function getQueries(Request $request, Application $app)
$payload['success'] = true;
$statusCode = 200;
} else {
$payload['message'] = self::_DEFAULT_ERROR_MESSAGE;
$payload['message'] = self::EXCEPTION_MESSAGE;
}
} catch (BadRequestHttpException $e) {
$payload['message'] = $e->getMessage();
Expand Down Expand Up @@ -149,7 +149,7 @@ public function getQueryById(Request $request, Application $app, $id)
$statusCode = 404;
}
} else {
$payload['message'] = self::_DEFAULT_ERROR_MESSAGE;
$payload['message'] = self::EXCEPTION_MESSAGE;
}
} catch (BadRequestHttpException $e) {
$payload['message'] = $e->getMessage();
Expand Down Expand Up @@ -202,7 +202,7 @@ public function createQuery(Request $request, Application $app)
$statusCode = 500;
}
} else {
$payload['message'] = self::_DEFAULT_ERROR_MESSAGE;
$payload['message'] = self::EXCEPTION_MESSAGE;
}
} catch (BadRequestHttpException $e) {
$payload['message'] = $e->getMessage();
Expand Down Expand Up @@ -290,7 +290,7 @@ public function updateQueryById(Request $request, Application $app, $id)
$statusCode = 404;
}
} else {
$payload['message'] = self::_DEFAULT_ERROR_MESSAGE;
$payload['message'] = self::EXCEPTION_MESSAGE;
}
} catch (BadRequestHttpException $e) {
$payload['message'] = $e->getMessage();
Expand Down Expand Up @@ -351,7 +351,7 @@ public function deleteQueryById(Request $request, Application $app, $id)
$statusCode = 404;
}
} else {
$payload['message'] = self::_DEFAULT_ERROR_MESSAGE;
$payload['message'] = self::EXCEPTION_MESSAGE;
}
} catch (BadRequestHttpException $e) {
$payload['message'] = $e->getMessage();
Expand Down

0 comments on commit 3964cb3

Please sign in to comment.