diff options
author | Frank Karlitschek <frank@owncloud.org> | 2013-10-17 04:37:40 -0700 |
---|---|---|
committer | Frank Karlitschek <frank@owncloud.org> | 2013-10-17 04:37:40 -0700 |
commit | d2b1a361cca422fee0f9d05b272d07637235e0ea (patch) | |
tree | accd22e2d14dc78b6114d5174eac1bba3c85886f | |
parent | ea4f6e2431f8545a71022916ac530d994803e99c (diff) | |
parent | 793ccfd1dfec6ace56f5090bbf955a487f707c0b (diff) | |
download | nextcloud-server-d2b1a361cca422fee0f9d05b272d07637235e0ea.tar.gz nextcloud-server-d2b1a361cca422fee0f9d05b272d07637235e0ea.zip |
Merge pull request #5379 from owncloud/undefined-shipped
fix undefined "shipped"
-rw-r--r-- | lib/private/app.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/private/app.php b/lib/private/app.php index 1a242ad968e..6f45b6e6dd7 100644 --- a/lib/private/app.php +++ b/lib/private/app.php @@ -770,12 +770,12 @@ class OC_App{ } // prio 2: shipped - if ($a['shipped'] != $b['shipped']) { - $atemp = ($a['shipped'] == true ? 1 : 0); - $btemp = ($b['shipped'] == true ? 1 : 0); - return ($btemp - $atemp); + $ashipped = (array_key_exists('shipped', $a) && $a['shipped'] === 'true') ? 1 : 0; + $bshipped = (array_key_exists('shipped', $b) && $b['shipped'] === 'true') ? 1 : 0; + if ($ashipped !== $bshipped) { + return ($bshipped - $ashipped); } - + // prio 3: recommended if ($a['internalclass'] != $b['internalclass']) { $atemp = ($a['internalclass'] == 'recommendedapp' ? 1 : 0); |