You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"<p>Dear @name</p><p>Submission @submission attempted sending an email with a large total file size of attachments surpassing @threshold for handler @handler (@handler_id) on form @form (@form_id).</p>", [
275
+
'<p>Dear @name</p><p>Submission @submission attempted sending an email with a large total file size of attachments surpassing @threshold for handler @handler (@handler_id) on form @form (@form_id).</p>', [
$form_state->setError($form['spv'], $this->t('Function %function_name does not exist', ['%function_name' => $functionName]));
142
+
return;
143
+
}
144
+
145
+
// Get the number of parameters for the defined function.
146
+
try {
147
+
$functionParamCount = (new \ReflectionFunction($functionName))->getNumberOfRequiredParameters();
148
+
}
149
+
catch (\ReflectionException$e) {
150
+
$form_state->setError(
151
+
$form['spv'],
152
+
$this->t('Invalid function %function_name', [
153
+
'%function_name' => $functionName,
154
+
])
155
+
);
156
+
$this->logger->error('Error reflecting function %function_name: %message', [
157
+
'%function_name' => $functionName,
158
+
'%message' => $e->getMessage(),
159
+
// Add the full exception to the context for future reference.
160
+
'exception' => $e,
161
+
]);
162
+
return;
163
+
}
164
+
165
+
// The maestro execute method always adds 2 parameters
166
+
// (queueID and processID) when handling the "bycontentfunction" case.
167
+
// @see MaestroSetProcessVariableTask::execute()
168
+
$functionParamCount -= 2;
169
+
170
+
if ($functionParamCount < 0) {
171
+
$form_state->setError($form['spv'], $this->t('Function %function_name is required to take at least 2 arguments.', ['%function_name' => $functionName]));
0 commit comments