aboutsummaryrefslogtreecommitdiffstats
path: root/global-functions
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2022-07-13 11:32:44 +0200
committerGravatar Christian Hesse <mail@eworm.de>2022-07-13 11:32:44 +0200
commit9a89cd54077dbb77c1130396d6218ec8fa735594 (patch)
tree70655096365cb454e9b569c87fe7c6b1585b6dd5 /global-functions
parent99a8148d17f5000f7fd4065246eda03dbcbedf58 (diff)
global-functions: update initialization of empty array
Having the parenthesis here is important for valid syntax!
Diffstat (limited to 'global-functions')
-rw-r--r--global-functions14
1 files changed, 7 insertions, 7 deletions
diff --git a/global-functions b/global-functions
index 94f3763..8ef158a 100644
--- a/global-functions
+++ b/global-functions
@@ -585,7 +585,7 @@
# prepare NotificationFunctions array
:if ([ :typeof $NotificationFunctions ] != "array") do={
- :set NotificationFunctions [ :toarray "" ];
+ :set NotificationFunctions ({});
}
# send notification via e-mail - expects one array argument
@@ -612,7 +612,7 @@
}
:if ([ :typeof $EmailQueue ] = "nothing") do={
- :set EmailQueue [ :toarray "" ];
+ :set EmailQueue ({});
}
:local Signature [ /system/note/get note ];
:set ($EmailQueue->[ :len $EmailQueue ]) {
@@ -634,7 +634,7 @@
:if ([ :typeof $Source ] != "array") do={
:set Source [ :tostr $1 ];
}
- :local Result [ :toarray "" ];
+ :local Result ({});
:foreach KeyValue in=[ :toarray $Source ] do={
:if ([ :find $KeyValue "=" ]) do={
:set ($Result->[ :pick $KeyValue 0 [ :find $KeyValue "=" ] ]) \
@@ -974,10 +974,10 @@
:global ScriptLockOrder;
:if ([ :typeof $ScriptLockOrder ] = "nothing") do={
- :set ScriptLockOrder [ :toarray "" ];
+ :set ScriptLockOrder ({});
}
:if ([ :typeof ($ScriptLockOrder->$Script) ] = "nothing") do={
- :set ($ScriptLockOrder->$Script) [ :toarray "" ];
+ :set ($ScriptLockOrder->$Script) ({});
}
:local JobCount do={
@@ -1052,7 +1052,7 @@
}
}
- :set ($ScriptLockOrder->$Script) [ :toarray "" ];
+ :set ($ScriptLockOrder->$Script) ({});
}
:if ([ :len [ /system/script/find where name=$Script ] ] = 0) do={
@@ -1065,7 +1065,7 @@
:if ([ $TicketCount $Script ] >= [ $JobCount $Script ]) do={
$LogPrintExit2 error $0 ("More tickets than running scripts '" . $Script . "', resetting!") false;
- :set ($ScriptLockOrder->$Script) [ :toarray "" ];
+ :set ($ScriptLockOrder->$Script) ({});
/system/script/job/remove [ find where script=$Script ];
}