Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/juliushaertl/apporder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulius Haertl <jus@bitgrid.net>2016-10-12 22:06:36 +0300
committerJulius Haertl <jus@bitgrid.net>2016-10-12 22:06:36 +0300
commite0f3ed07359e80665a93998134b7fe2399c6d449 (patch)
treec44f129ab7baa7555907c0ddcb6ad5ad11514f75
parent799c0eb6a2496a2d109b25480deb919858ad8a0c (diff)
Fix invalid argument on foreach #20
-rw-r--r--util.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/util.php b/util.php
index 1d6cd69..af6a159 100644
--- a/util.php
+++ b/util.php
@@ -52,9 +52,11 @@ class Util {
foreach ($nav as $app) {
$nav_tmp[$app['href']] = $app;
}
- foreach ($order as $app) {
- if (array_key_exists($app, $nav_tmp)) {
- $result[$app] = $nav_tmp[$app];
+ if(is_array($order)) {
+ foreach ($order as $app) {
+ if (array_key_exists($app, $nav_tmp)) {
+ $result[$app] = $nav_tmp[$app];
+ }
}
}
foreach ($nav as $app) {