retrieve_conf failed, config not applied

Hi guys,

I’m experimenting a retrieve_conf failed error
It seems to follow a Digium Update from module admin.
I waslooking to get back to the previous version, but the module seems not to integrate this function

Would you have a recommandation to solde the problem ?
Thanks !

[[email protected] ~]# /var/lib/asterisk/bin/retrieve_conf
Whoops\Exception\ErrorException: Invalid argument supplied for foreach() in file /var/www/html/admin/modules/digium_phones/conf/res_digium_phone_devices.php on line 193
Stack trace:
  1. Whoops\Exception\ErrorException->() /var/www/html/admin/modules/digium_phones/conf/res_digium_phone_devices.php:193
  2. Whoops\Run->handleError() /var/www/html/admin/modules/digium_phones/conf/res_digium_phone_devices.php:193
  3. res_digium_phone_devices() /var/www/html/admin/modules/digium_phones/functions.inc.php:435
  4. digium_phones_conf->generateConf() /var/www/html/admin/libraries/BMO/FileHooks.class.php:65
  5. FreePBX\FileHooks->processOldHooks() /var/www/html/admin/libraries/BMO/FileHooks.class.php:24
  6. FreePBX\FileHooks->processFileHooks() /var/lib/asterisk/bin/retrieve_conf:823

In order to pass php problems, i had to comment parts of the php scripts :
I think it’s not the way to do it

res_digium_phone_devices.php
> foreach ($queue[‘entries’] as $entry) {
> if ($entry[‘deviceid’] == $deviceid) {
> $doutput[] = “application=queue-{$queueid}-{$deviceid}”;
> }
> }

res_digium_phone_applications.php

foreach ($conf->digium_phones->get_queues() as $queueid=>$queue) {
                foreach($queue['entries'] as $entry) {
                        if ($entry['deviceid'] == null) {
                                continue;
                        }
                        $output[] = "[queue-{$queueid}-{$entry['deviceid']}]";
                        $output[] = "type=application";
                        $output[] = "application=queue";
                        $output[] = "queue={$queueid}";
                        $output[] = "permission={$entry['permission']}";
                        if ($entry['member'] == null) {
                                $output[] = "member=false";
                        } else {
                                if ($entry['location'] != null) {
                                        $output[] = "location={$entry['location']}";
                                }
                                /* Try to find the toggle feature code and use that */
                              $fcc = new featurecode('queues', 'que_toggle');
                                $toggle = $fcc->getCodeActive();
                                unset($fcc);
                                if ($toggle != "") {
                                        $output[] = "login_exten={$toggle}{$queueid}@ext-queues";
                                        $output[] = "logout_exten={$toggle}{$queueid}@ext-queues";
                                } else if ($amp_conf['GENERATE_LEGACY_QUEUE_CODES']) {
                                        $output[] = "login_exten={$queueid}*@ext-queues";
                                        $output[] = "logout_exten={$queueid}**@ext-queues";
                                }
                        }
                        $output[] = "";
                }
        }