diff --git a/CHANGELOG.md b/CHANGELOG.md index ee14b5f..bf58fe5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ ### Feat - **Tracker:** Add `retry in` field when failed +- **UserInfo:** Add Cache Lock of user access_{time,ip} update ### Fix - **Cookies:** Fix session sep from `%` to `_` diff --git a/apps/models/form/Links/EditForm.php b/apps/models/form/Links/EditForm.php index b71b0f4..645d5c3 100644 --- a/apps/models/form/Links/EditForm.php +++ b/apps/models/form/Links/EditForm.php @@ -45,7 +45,7 @@ protected function checkLinkData() 'administrator' => $this->link_admin, 'email' => $this->link_email, 'reason' => $this->link_reason ]; - if ($this->link_id !== 0) { // Check if old links should be update + if ((int)$this->link_id !== 0) { // Check if old links should be update $this->link_old_data = app()->pdo->createCommand('SELECT * FROM `links` WHERE id = :id')->bindParams([ 'id' => $this->link_id ])->queryOne(); @@ -55,7 +55,7 @@ protected function checkLinkData() $this->link_new_data['id'] = $this->link_id; // Diff old and new data. - $this->link_data_diff = array_diff($this->link_new_data, $this->link_old_data); + $this->link_data_diff = array_diff_assoc($this->link_new_data, $this->link_old_data); if (count($this->link_data_diff) === 0) { $this->buildCallbackFailMsg('links:update', 'No data update'); }