From 5c9b9f140d5e79e1074e27526bd0f7045e27633c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=91cze=20Bence?= Date: Sun, 7 May 2023 01:17:45 +0200 Subject: [PATCH] [debug] --- src/PersistentData/Model/ModelWithSlug.php | 2 ++ src/PersistentData/PersistentDataManager.php | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/PersistentData/Model/ModelWithSlug.php b/src/PersistentData/Model/ModelWithSlug.php index 2d69ebb..02b9c5e 100644 --- a/src/PersistentData/Model/ModelWithSlug.php +++ b/src/PersistentData/Model/ModelWithSlug.php @@ -22,6 +22,8 @@ abstract class ModelWithSlug extends Model { if ($this->slug === null) { $this->slug = $this->generateSlug(); + var_dump('getSlug called'); + var_dump($this->slug); } return $this->slug; diff --git a/src/PersistentData/PersistentDataManager.php b/src/PersistentData/PersistentDataManager.php index 60fec89..549c2e7 100644 --- a/src/PersistentData/PersistentDataManager.php +++ b/src/PersistentData/PersistentDataManager.php @@ -113,6 +113,9 @@ class PersistentDataManager implements IPersistentDataManager } } + var_dump($modified); + var_dump($diff); + if (count($modified) > 0) { if ($model instanceof ModelWithSlug && isset($modified['slug'])) { $modified['slug'] = $this->generateUniqueSlug($model, $modified['slug']);