After you enable the module and connect the instapage account and go to add a new page, the: Invalid argument supplied for foreach() in Drupal\instapage\Controller\PageSettingsController->content() warning is shown, because there are no pages added yet. I also removed the soon to be deprecated drupal_set_message.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | 3076776-6.patch | 3.03 KB | bcizej |
| #5 | interdiff_3-5.txt | 520 bytes | kbrodej |
| #5 | 3076776-5.patch | 5.06 KB | kbrodej |
| #3 | 3075776-3.patch | 5.06 KB | nace_fr |
| #2 | invalid_argument-3075776-2.patch | 3.69 KB | deaom |
Comments
Comment #2
deaom commentedAnd the patch that should fix the error.
Comment #3
nace_fr commentedI was able to reproduce this issue and tested the patch from #2. It applied without errors/warnings and solved the problem. I just added DI to the patch. Thanks DeaOm.
Comment #4
deaom commentedPatch applies and messages are displayed. DI seems to be correctly implemented so marking this as RTBC.
Comment #5
kbrodej commentedHi.
Reviewed the patch from #3.
Replaced
if ($pages != NULL)toif (is_array($pages)).Comment #7
bcizej commentedPatch rerolled and commited. Thanks everyone.