From 5262489bf32c6ddfeab3d38803664b77eb0d5ac9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?= Date: Thu, 19 Aug 2021 12:07:33 +0200 Subject: [PATCH 1/2] =?UTF-8?q?Ticket=20n=C2=B0279=20Trying=20to=20get=20p?= =?UTF-8?q?roperty=20'Statut'=20of=20non-object?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- class/MesBR.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/class/MesBR.php b/class/MesBR.php index 92e8c34..a6c39a1 100644 --- a/class/MesBR.php +++ b/class/MesBR.php @@ -61,6 +61,10 @@ class MesBR $res = $this->callAPI("GET", "/updatebasket", $datas); + if (!$res) { + error_log("MESBR - CODE : 999 - MESSAGE : Cannot read API Response (non json)"); + return ['status' => 'KO', 'code' => 999, 'message' => 'Cannot read API Response (non json)']; + } if ($res->Statut === 'KO') { error_log("MESBR - CODE : $res->Code - MESSAGE : $res->Message"); return ['status' => 'KO', 'code' => $res->Code, 'message' => $res->Message]; From 73e2b27603d69076fc39c64b85d42d29233c7c47 Mon Sep 17 00:00:00 2001 From: Olivier Legat Date: Wed, 29 Sep 2021 17:35:38 +0200 Subject: [PATCH 2/2] make instant win unique in participation --- ...ke_instant_win_unique_in_participation.php | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 database/migrations/2021_09_29_173331_make_instant_win_unique_in_participation.php diff --git a/database/migrations/2021_09_29_173331_make_instant_win_unique_in_participation.php b/database/migrations/2021_09_29_173331_make_instant_win_unique_in_participation.php new file mode 100644 index 0000000..3831f7f --- /dev/null +++ b/database/migrations/2021_09_29_173331_make_instant_win_unique_in_participation.php @@ -0,0 +1,32 @@ +unique('instant_win_id'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('participation', function (Blueprint $table) { + // + }); + } +}