when getProjectDags() returns false (in REDCap::getGroupNames, if (empty($groups)) return false;), the array_keys will give an exception and crash:
TypeError: array_keys(): Argument #1 ($array) must be of type array, bool given in modules/redcap_pro_v2.1.1/src/enroll.php:57
fix, using a typecast...? probably not really the best fix, it works. better probably would be check for false and adjust the logic.
if ( (!empty($redcap_dag) && $dag !== $redcap_dag) || !in_array($dag, array_keys((array)$dagHelper->getProjectDags())) ) {
src/enroll.php
when getProjectDags() returns false (in REDCap::getGroupNames, if (empty($groups)) return false;), the array_keys will give an exception and crash: TypeError: array_keys(): Argument #1 ($array) must be of type array, bool given in modules/redcap_pro_v2.1.1/src/enroll.php:57
if ( (!empty($redcap_dag) && $dag !== $redcap_dag) || !in_array($dag, array_keys($dagHelper->getProjectDags())) ) {
fix, using a typecast...? probably not really the best fix, it works. better probably would be check for false and adjust the logic. if ( (!empty($redcap_dag) && $dag !== $redcap_dag) || !in_array($dag, array_keys((array)$dagHelper->getProjectDags())) ) {