Contact/Storage, Set $grants by default as an empty array #65
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When you call:
$ui = new addressbook_ui();
$groups = $ui->get_addressbooks(Acl::ADD);
in the settings hook of a custom application you get the following warning during setup "install all applications":
2019/03/06 07:50:58 [error] 1276#1276: *279 FastCGI sent in stderr: "PHP message: PHP Warning: Invalid argument supplied for foreach() in /home/asig/dev/egw/egwdev2/html/egw/api/src/Contacts.php on line 373
PHP message: #1 /home/asig/dev/egw/egwdev2/html/egw/actele/inc/class.actele_hooks.inc.php(63): EGroupware\Api\Contacts->get_addressbooks(2)
PHP message: #2 /home/asig/dev/egw/egwdev2/html/egw/api/src/loader/deprecated_factory.php(179): actele_hooks::settings(Array)
PHP message: #3 /home/asig/dev/egw/egwdev2/html/egw/setup/inc/class.setup.inc.php(719): ExecMethod('actele_hooks::s...', Array)
PHP message: #4 /home/asig/dev/egw/egwdev2/html/egw/setup/inc/class.setup_process.inc.php(432): setup->set_default_preferences('actele')
PHP message: #5 /home/asig/dev/egw/egwdev2/html/egw/setup/inc/class.setup_process.inc.php(147): setup_process->current(Array, NULL)
PHP message: #6 /home/asig/dev/egw/egwdev2/html/egw/setup/index.php(349): setup_process->pass(Array, 'new', NULL, NULL)
PHP message: #7 {main}