Commit e30eb445 authored by TravisCarden's avatar TravisCarden

Fixed invalid argument supplied for foreach() error.

parent 859118c5
......@@ -105,7 +105,7 @@ function checklistapi_compact_mode_is_on() {
*/
function checklistapi_get_checklist_info($id = NULL) {
$definitions = &drupal_static(__FUNCTION__);
if ($definitions !== NULL) {
if (!is_array($definitions)) {
// Get definitions.
$definitions = \Drupal::moduleHandler()->invokeAll('checklistapi_checklist_info');
foreach ($definitions as $key => $value) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment