Skip to content
Browse files

Merge pull request #1534 from phproberto/pksempty

[IMP] Ensure that publish doesnt receive empty ids array
  • Loading branch information...
2 parents 7b23e48 + 94abe53 commit e5719ee906d31107211d769fe114632cf0098f84 @pasamio pasamio committed Sep 22, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 libraries/legacy/model/admin.php
View
6 libraries/legacy/model/admin.php
@@ -833,6 +833,12 @@ public function publish(&$pks, $value = 1)
$table = $this->getTable();
$pks = (array) $pks;
+ // Ensure that we do not receive an empty array
+ if (empty($pks))
+ {
+ return true;
+ }
+
// Include the content plugins for the change of state event.
JPluginHelper::importPlugin('content');

0 comments on commit e5719ee

Please sign in to comment.
Something went wrong with that request. Please try again.