From e07974802d77890afa9bc8ec699e92df0b4b193a Mon Sep 17 00:00:00 2001 From: Benn Oshrin Date: Sun, 25 Jan 2026 09:01:01 -0500 Subject: [PATCH] Miscellaneous fixes (NOJIRA) --- app/src/Controller/MatchgridsController.php | 2 +- app/src/Lib/Match/MatchgridBuilder.php | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/Controller/MatchgridsController.php b/app/src/Controller/MatchgridsController.php index 7591d8243..ade88c7f5 100644 --- a/app/src/Controller/MatchgridsController.php +++ b/app/src/Controller/MatchgridsController.php @@ -71,7 +71,7 @@ public function build(string $id) { $this->Matchgrids->build((int)$id); $this->Flash->success(__('match.rs.build')); } - catch(Exception $e) { + catch(\Exception $e) { $this->Flash->error(__('match.er.build', [$e->getMessage()])); } diff --git a/app/src/Lib/Match/MatchgridBuilder.php b/app/src/Lib/Match/MatchgridBuilder.php index 104ad5930..0fd4b95d8 100644 --- a/app/src/Lib/Match/MatchgridBuilder.php +++ b/app/src/Lib/Match/MatchgridBuilder.php @@ -146,6 +146,10 @@ protected function configToSchema( } } + if(empty($Matchgrid->matchgrid_setting->referenceid_method)) { + throw new \InvalidArgumentException("Reference ID Method not set for Matchgrid"); + } + // If the Matchgrid uses Sequence for the referenceid_method, create the sequence if($Matchgrid->matchgrid_setting->referenceid_method == ReferenceIdEnum::Sequence) { $schema->createSequence($Matchgrid->matchgrid_setting->ref_id_sequence_name,