Skip to content


Subversion checkout URL

You can clone with
Download ZIP


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

merged 1 commit into from

3 participants


Trying to disable the default item in Joomla CMS finishes in a JModelAdmin::publish with an empty ids array.

I'm going also to fix CMS to ensure that we do not call this method with an empty array.

Joomlacode tracker issue:


Tested successfully by applying 1534 to the CMS which fixes the issue in 28990.

@pasamio pasamio merged commit e5719ee into joomla:staging
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 0 deletions.
  1. +6 −0 libraries/legacy/model/admin.php
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.
Something went wrong with that request. Please try again.