From f926af9e0b624d23f7891fbfcb84c8cbcb98a2fd Mon Sep 17 00:00:00 2001 From: Michiel Stornebrink Date: Sun, 29 Dec 2024 13:32:37 +0100 Subject: [PATCH] Bugfix Php warning about undefined array key 'ifcPath' --- backend/src/Ampersand/Controller/ResourceController.php | 6 +++--- changelog.md | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/backend/src/Ampersand/Controller/ResourceController.php b/backend/src/Ampersand/Controller/ResourceController.php index 6015d14cb..a24ed723a 100644 --- a/backend/src/Ampersand/Controller/ResourceController.php +++ b/backend/src/Ampersand/Controller/ResourceController.php @@ -61,7 +61,7 @@ public function createNewResourceId(Request $request, Response $response, array public function getResource(Request $request, Response $response, array $args): Response { // Input - $pathList = ResourcePath::makePathList($args['resourcePath']); + $pathList = ResourcePath::makePathList($args['resourcePath'] ?? null); $options = Options::getFromRequestParams($request->getQueryParams()); $depth = $request->getQueryParam('depth'); @@ -79,7 +79,7 @@ public function getResource(Request $request, Response $response, array $args): public function putPatchPostResource(Request $request, Response $response, array $args): Response { // Input - $pathList = ResourcePath::makePathList($args['ifcPath']); + $pathList = ResourcePath::makePathList($args['ifcPath'] ?? null); $options = Options::getFromRequestParams($request->getQueryParams()); $depth = $request->getQueryParam('depth'); $body = $request->reparseBody()->getParsedBody(); @@ -141,7 +141,7 @@ public function putPatchPostResource(Request $request, Response $response, array public function deleteResource(Request $request, Response $response, array $args): Response { // Input - $pathList = ResourcePath::makePathList($args['ifcPath']); + $pathList = ResourcePath::makePathList($args['ifcPath'] ?? null); // Prepare $transaction = $this->app->newTransaction(); diff --git a/changelog.md b/changelog.md index 468f37ebd..3cd5a631d 100644 --- a/changelog.md +++ b/changelog.md @@ -15,6 +15,7 @@ Additional labels for pre-release and build metadata are available as extensions * It affects names and labels of all artefacts (concepts, relations, interfaces, rules, views, etc) * It affects metadata from PrototypeContext. Be sure to update those when used in application extensions or running environments * [Issue 161](https://github.com/AmpersandTarski/prototype/issues/161) Bugfix ConceptNotDefinedException +* [Issue 180](https://github.com/AmpersandTarski/prototype/issues/180) Bugfix Php warning about undefined array key 'ifcPath' * [Issue 210](https://github.com/AmpersandTarski/prototype/issues/210) Bugfix using TableType enum for method to empty a relation population * [Issue 218](https://github.com/AmpersandTarski/prototype/issues/218) Improve error reporting for exceptions in excel importer * [Issue 221](https://github.com/AmpersandTarski/prototype/issues/221) Bugfix typescript type object property naming by surrounding view labels with quotes