hundedaten jetzt korrekt

This commit is contained in:
christian committed 2023-10-23 10:00:19 +02:00
1 parent f7a7c3457b
commit 7779d189df
5 files changed
+45 -49

No files matched your search

+5 -1
View File
@@ -19,14 +19,18 @@ class Dogs extends Page {
$dogs = $_SESSION['user']->data['dogs'];
$doggos = [];
foreach($dogs as $dogid)
foreach($dogs as $key => $dogid)
{
//var_dump($dogid);
$dog = new Dog();
try{
$dog->load($dogid);
}
catch(Exception $e)
{
error_log("Dog $dogid not found. Deleting from user");
unset($_SESSION['user']->data['dogs'][$key]);
$_SESSION['user']->save();
continue;
}
if($dog->data)