Skip to content
This repository has been archived by the owner on Nov 2, 2020. It is now read-only.

Commit

Permalink
fix(Form): Link\EditForm Update diff
Browse files Browse the repository at this point in the history
  • Loading branch information
Rhilip committed Jul 16, 2019
1 parent f5344af commit fd7b241
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `_`
Expand Down
4 changes: 2 additions & 2 deletions apps/models/form/Links/EditForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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');
}
Expand Down

0 comments on commit fd7b241

Please sign in to comment.