Skip to content

Commit 55db224

Browse files
committed
Unique validation rule fixed
1 parent 77e36ff commit 55db224

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

CHANGELOG

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
CHANGELOG
22
=========
33

4+
2014-11-17, v1.1.3
5+
------------------
6+
7+
* Bugfix: Unique validation rule fixed
8+
49
2014-11-08, v1.1.2
510
------------------
611

src/SleepingOwl/Admin/Validation/Validator.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,13 @@ protected function validateUrlStubFull($attribute, $value, $parameters)
5353
*/
5454
protected function validateUnique($attribute, $value, $parameters)
5555
{
56-
$id = $this->customAttributes['id'];
57-
if ($id !== null)
56+
if (isset($this->customAttributes['id']))
5857
{
59-
$parameters[] = $id;
58+
$id = $this->customAttributes['id'];
59+
if ($id !== null)
60+
{
61+
$parameters[] = $id;
62+
}
6063
}
6164
return parent::validateUnique($attribute, $value, $parameters);
6265
}

0 commit comments

Comments
 (0)