prevent unset

This commit is contained in:
Ludvík Prokopec 2022-09-02 16:22:39 +02:00
parent c730a6d19f
commit a51abc7ec6
1 changed files with 4 additions and 0 deletions

View File

@ -31,6 +31,10 @@ return [
"post" => function($data, $headers, $db) {
$imagesHostName = 'https://geohry.skolazdola.cz/';
if(!isset($data['gameurl']) || empty($data['gameurl'])) return [
"error" => "Property 'gameurl' is not set."
];
$gameUrl = $data['gameurl'];
$gameDetails = $db->select('games4', '*', [