[IMP] Ensure that publish doesnt receive empty ids array #1534

Merged
merged 1 commit into from Sep 23, 2012
@@ -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');