Skip to content

Commit

Permalink
Fixed primary key null not being respected
Browse files Browse the repository at this point in the history
  • Loading branch information
roland-d committed May 10, 2015
1 parent c8b6bf3 commit 47a0f6e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions libraries/joomla/table/table.php
Original file line number Diff line number Diff line change
Expand Up @@ -1524,14 +1524,14 @@ public function publish($pks = null, $state = 1, $userId = 0)
$userId = (int) $userId;
$state = (int) $state;

if (!is_array($pks))
{
$pks = array($pks);
}

if (!is_null($pks))
{
foreach ($pks AS $key => $pk)
if (!is_array($pks))
{
$pks = array($pks);
}

foreach ($pks as $key => $pk)
{
if (!is_array($pk))
{
Expand Down

0 comments on commit 47a0f6e

Please sign in to comment.