Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-11-08 11:16:03 +0100
committerErich Eckner <git@eckner.net>2018-11-08 11:16:03 +0100
commit3e2387ab42cb42bda60940449641c49bd0e09e35 (patch)
tree8ca07bba9e90eb2b7c52b2c54b93d23bffa373b3 /lib
parent156df01c61ba56b005cff6777eb562a010f2a4c2 (diff)
lib/helper.php: if_unset() new
Diffstat (limited to 'lib')
-rw-r--r--lib/helper.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/helper.php b/lib/helper.php
index ffa5943..84cb69c 100644
--- a/lib/helper.php
+++ b/lib/helper.php
@@ -162,3 +162,10 @@ function git_url($repository,$type,$commit,$path,$line = null,$commit_is_hash =
}
};
};
+
+function if_unset($array, $index, $default) {
+ if (isset($array[$index]))
+ return $array[$index];
+ else
+ return $default;
+};