Skip to content

Commit

Permalink
better check place
Browse files Browse the repository at this point in the history
now the check is executed always
  • Loading branch information
alikon committed Jun 18, 2015
1 parent 1883bc7 commit 1f4d452
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions libraries/joomla/table/asset.php
Expand Up @@ -98,6 +98,10 @@ public function loadByName($name)
public function check()
{
$this->parent_id = (int) $this->parent_id;
if (empty($this->rules))
{
$this->rules = '{}';
}

// JTableNested does not allow parent_id = 0, override this.
if ($this->parent_id > 0)
Expand All @@ -116,13 +120,8 @@ public function check()
else
{
$this->setError('Invalid Parent ID');

return false;
}
if (empty($this->rules))
{
$this->rules = '{}';
}
}

return true;
Expand Down

0 comments on commit 1f4d452

Please sign in to comment.