Skip to content

Commit

Permalink
issue: API Unexpected Data Warnings
Browse files Browse the repository at this point in the history
This addresses an issue reported on the Forum where `API Unexpected Data`
warnings are appearing in the system logs for the `thread_entry_recipients`
and `system_emails` keys for piped emails. This is due to the API request
validator that checks the keys of the API data; if a key's data is an array
itself it loops through the validator again to check the key(s) inside the
data array. This is fine for most keys but for the `thread_entry_recipients`
and `system_emails` keys the request structure does not contain the
necessary sub-keys to validate the data keys. This adds the necessary
sub-keys to the request structure so that `thread_entry_recipients` and
`system_emails` data keys can be validated.
  • Loading branch information
JediKev committed Apr 23, 2019
1 parent ed1381e commit 4f68eb9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion include/api.tickets.php
Expand Up @@ -15,7 +15,12 @@ function getRequestStructure($format, $data=null) {
array("name", "type", "data", "encoding", "size")
),
"message", "ip", "priorityId",
"system_emails", "thread_entry_recipients"
"system_emails" => array(
"*" => "*"
),
"thread_entry_recipients" => array (
"*" => array("to", "cc")
)
);
# Fetch dynamic form field names for the given help topic and add
# the names to the supported request structure
Expand Down

0 comments on commit 4f68eb9

Please sign in to comment.