Warning: foreach() argument must be of type array|object, null given in Drupal\advanced_pwa\Controller\AdvancedpwaController->userHasSelectedRoles() (line 319 of /var/www/vhosts/mysite.com/httpdocs/web/modules/contrib/advanced_pwa/src/Controller/AdvancedpwaController.php)
#0 /var/www/vhosts/mysite.com/httpdocs/web/core/includes/bootstrap.inc(164): _drupal_error_handler_real()
#1 /var/www/vhosts/mysite.com/httpdocs/web/modules/contrib/advanced_pwa/src/Controller/AdvancedpwaController.php(319): _drupal_error_handler()
#2 /var/www/vhosts/mysite.com/httpdocs/web/modules/contrib/advanced_pwa/src/Controller/AdvancedpwaController.php(290): Drupal\advanced_pwa\Controller\AdvancedpwaController->userHasSelectedRoles()
#3 [internal function]: Drupal\advanced_pwa\Controller\AdvancedpwaController->settings()
#4 /var/www/vhosts/mysite.com/httpdocs/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
#5 /var/www/vhosts/mysite.com/httpdocs/web/core/lib/Drupal/Core/Render/Renderer.php(627): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#6 /var/www/vhosts/mysite.com/httpdocs/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(121): Drupal\Core\Render\Renderer->executeInRenderContext()
#7 /var/www/vhosts/mysite.com/httpdocs/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
#8 /var/www/vhosts/mysite.com/httpdocs/vendor/symfony/http-kernel/HttpKernel.php(181): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#9 /var/www/vhosts/mysite.com/httpdocs/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#10 /var/www/vhosts/mysite.com/httpdocs/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle()
#11 /var/www/vhosts/mysite.com/httpdocs/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#12 /var/www/vhosts/mysite.com/httpdocs/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#13 /var/www/vhosts/mysite.com/httpdocs/web/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle()
#14 /var/www/vhosts/mysite.com/httpdocs/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(191): Drupal\big_pipe\StackMiddleware\ContentLength->handle()
#15 /var/www/vhosts/mysite.com/httpdocs/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(128): Drupal\page_cache\StackMiddleware\PageCache->fetch()
#16 /var/www/vhosts/mysite.com/httpdocs/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(82): Drupal\page_cache\StackMiddleware\PageCache->lookup()
#17 /var/www/vhosts/mysite.com/httpdocs/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle()
#18 /var/www/vhosts/mysite.com/httpdocs/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#19 /var/www/vhosts/mysite.com/httpdocs/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#20 /var/www/vhosts/mysite.com/httpdocs/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle()
#21 /var/www/vhosts/mysite.com/httpdocs/web/core/lib/Drupal/Core/DrupalKernel.php(704): Drupal\Core\StackMiddleware\StackedHttpKernel->handle()
#22 /var/www/vhosts/mysite.com/httpdocs/web/index.php(19): Drupal\Core\DrupalKernel->handle()
#23 {main}
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

2dareis2do created an issue. See original summary.

sarwan_verma made their first commit to this issue’s fork.

sarwan_verma’s picture

Status: Active » Needs review

Hi @2dareis2do,

I have created MR!11 for the above issue, Please review it once.

2dareis2do’s picture

Patch (diff) applies and fixes Warning

Many thanks

2dareis2do’s picture

Status: Needs review » Reviewed & tested by the community

gmaximus’s picture

Status: Reviewed & tested by the community » Fixed
sarwan_verma’s picture

hey @gMaximus,

when you move an issue to the "Fixed" state, please remember to give credit to the contributors.

Thankyou !

gmaximus’s picture

Hi @sarwan_verma,

Crediting is something very important to me.

In the commit above, it shows committed by me and authored by you?

Am I missing something? I want it to be right

gmaximus’s picture

My bad. I missed a step. I originally believed that by using the correct commit message, everything else happened.

Thanks for pointing this out. I'll do the same for other fixed issues.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.