ctsit / save_survey_pdf_to_field

A REDCap external module to save a PDF of a survey to a file upload field
Other
0 stars 10 forks source link

TypeError: array_search(): Argument #2 ($haystack) must be of type array, null given #20

Closed pbchase closed 1 year ago

pbchase commented 1 year ago

Hahn, Bashirat D xxxxxx@uabmc.edu Reports:

Subject: EXT MSG REDCap External Module Hook Exception - save_survey_pdf_to_field

[This message was automatically generated by REDCap]

The 'save_survey_pdf_to_field' module threw the following exception when calling the hook method 'hook_survey_complete':

TypeError: array_search(): Argument #2 ($haystack) must be of type array, null given in C:\inetpub\wwwroot\redcap\modules\save_survey_pdf_to_field_v1.1.2\ExternalModule.php:31 Stack trace:

0 C:\inetpub\wwwroot\redcap\modules\save_survey_pdf_to_field_v1.1.2\ExternalModule.php(31): array_search()

1 C:\inetpub\wwwroot\redcap\redcap_v13.4.12\ExternalModules\classes\ExternalModules.php(3162): SaveSurveyPdfToFieldModule\ExternalModule\ExternalModule->hook_survey_complete()

2 C:\inetpub\wwwroot\redcap\redcap_v13.4.12\ExternalModules\classes\ExternalModules.php(3327): ExternalModules\ExternalModules::startHook()

3 C:\inetpub\wwwroot\redcap\redcap_v13.4.12\ExternalModules\classes\ExternalModules.php(3360): ExternalModules\ExternalModules::ExternalModules{closure}()

4 C:\inetpub\wwwroot\redcap\redcap_v13.4.12\Classes\Hooks.php(42): ExternalModules\ExternalModules::callHook()

5 C:\inetpub\wwwroot\redcap\redcap_v13.4.12\Surveys\index.php(2434): Hooks::call()

6 C:\inetpub\wwwroot\redcap\surveys\index.php(9): include('...')

7 {main}

User: [survey respondent] Project ID: 18 Module Name: Save Survey PDF to a Field (save_survey_pdf_to_field) Module Author(s): ...

pbchase commented 1 year ago

@ChemiKyle, this error looks familiar.

pbchase commented 1 year ago

Addressed by PR #22