Title: Errors on non admin user
Last modified: October 31, 2018

---

# Errors on non admin user

 *  Resolved [TheSickle](https://wordpress.org/support/users/thesickle/)
 * (@thesickle)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/errors-on-non-admin-user/)
 * Hi,
 * Installed this plugin on my site and all works great, problem happens when I 
   switch to another user, there is some error code on the top of all screens in
   admin panel. User role is Booking Manager from the bookly plugin. Here is the
   code visible:
 * supplied for foreach() in /home/tenebris/public_html/wp-content/plugins/cookie-
   law-info/admin/class-cookie-law-info-admin.php on line 161
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/tenebris/public_html/wp-content/plugins/cookie-law-info/admin/class-
   cookie-law-info-admin.php:161) in /home/tenebris/public_html/wp-admin/includes/
   misc.php on line 1126
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/tenebris/public_html/wp-content/plugins/cookie-law-info/admin/class-
   cookie-law-info-admin.php:161) in /home/tenebris/public_html/wp-includes/option.
   php on line 919
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/tenebris/public_html/wp-content/plugins/cookie-law-info/admin/class-
   cookie-law-info-admin.php:161) in /home/tenebris/public_html/wp-includes/option.
   php on line 920
    -  This topic was modified 7 years, 7 months ago by [TheSickle](https://wordpress.org/support/users/thesickle/).

Viewing 12 replies - 1 through 12 (of 12 total)

 *  Plugin Author [WebToffee](https://wordpress.org/support/users/webtoffee/)
 * (@webtoffee)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/errors-on-non-admin-user/#post-10836684)
 * Hi [@thesickle](https://wordpress.org/support/users/thesickle/),
 * We have fixed the error for default non-admin users in version 1.6.10. However,
   as you have mentioned that you are using custom role, we will need to check this
   specifically.
 * Please reach us via [support forum](https://www.webtoffee.com/support/).
 *  [ldixon789](https://wordpress.org/support/users/ldixon789/)
 * (@ldixon789)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/errors-on-non-admin-user/#post-10838578)
 * Hi,
    I’m getting the same error for someone with editor permissions who logged
   in directly and also if admin uses ‘user switching’ to switch to editor role.
   I’m running version 1.6.10. Thanks for your help.
 *  Thread Starter [TheSickle](https://wordpress.org/support/users/thesickle/)
 * (@thesickle)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/errors-on-non-admin-user/#post-10838590)
 * Hello,
 * Yes that support forum requires premium support, which I will not get unless 
   I have a working product in front of me. If there will be no further updates 
   from your side to permanently fix this issue and not only default included with
   WP, please let us know to move to another product.
 * Thank you.
 *  [mcmasterp](https://wordpress.org/support/users/mcmasterp/)
 * (@mcmasterp)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/errors-on-non-admin-user/#post-10839757)
 * I am also seeing this error when one of our authors tries to view photos in the
   media gallery
 *  Plugin Author [WebToffee](https://wordpress.org/support/users/webtoffee/)
 * (@webtoffee)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/errors-on-non-admin-user/#post-10840114)
 * Hi [@thesickle](https://wordpress.org/support/users/thesickle/), [@mcmasterp](https://wordpress.org/support/users/mcmasterp/),
   [@ldixon789](https://wordpress.org/support/users/ldixon789/),
 * The support forum mentioned above is **not paid** support. You just have to submit
   a ticket there so that we can provide you with a fixed version zip.
 * We are definitely releasing the fix publicly soon along with some other improvements
   upon which we are working on currently.
 *  [Gustavo Troisi](https://wordpress.org/support/users/gus0074/)
 * (@gus0074)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/errors-on-non-admin-user/#post-10843266)
 * Same problem here, waiting for the fix, many thanks!
 *  [edgarkaplan](https://wordpress.org/support/users/edgarkaplan/)
 * (@edgarkaplan)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/errors-on-non-admin-user/#post-10847296)
 * Got an error as well on a non-admin user. Happened after I just updated, didn’t
   have this error before, so must be triggered by whatever the last change to your
   plugin was.
 * Mine reads:
    <b>Warning</b>: Invalid argument supplied for foreach() in <b>/home/…/
   public_html/wp-content/plugins/cookie-law-info/admin/class-cookie-law-info-admin.
   php</b> on line <b>161</b><br />
 * Hope this helps with your troubleshooting. Looking forward to the bug fix!
 *  [marcebcn](https://wordpress.org/support/users/marcebcn/)
 * (@marcebcn)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/errors-on-non-admin-user/#post-10848754)
 * Only Admin-Users working without error code displaying on backend …
    Pls solve
   asap!
 * You can imagine that using your plugin in a pro-environment (with several users)
   this error code on the backend is something that should be addressed rapidly!
 * Thx in advance!
    Marcel
 * error code (shortened):
    Warning: Invalid argument supplied for foreach() in …..
   wp/htdocs/wp-content/plugins/cookie-law-info/admin/class-cookie-law-info-admin.
   php on line 161
 * Warning: Cannot modify header information – headers already sent by (output started
   at /….. .wp/htdocs/wp-content/plugins/cookie-law-info/admin/class-cookie-law-
   info-admin.php:161) in …. /htdocs/wp-admin/includes/misc.php on line 1126
 *  Plugin Author [WebToffee](https://wordpress.org/support/users/webtoffee/)
 * (@webtoffee)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/errors-on-non-admin-user/#post-10848831)
 * [@marcebcn](https://wordpress.org/support/users/marcebcn/)
 * Please update your plugin to the latest version [1.7.0](https://downloads.wordpress.org/plugin/cookie-law-info.1.7.0.zip).
   This version has the fix for custom roles aswell.
 *  [marcebcn](https://wordpress.org/support/users/marcebcn/)
 * (@marcebcn)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/errors-on-non-admin-user/#post-10849101)
 * [@webtoffee](https://wordpress.org/support/users/webtoffee/)
 * cool, thx! just updated and evth working fine now!
 *  Plugin Author [WebToffee](https://wordpress.org/support/users/webtoffee/)
 * (@webtoffee)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/errors-on-non-admin-user/#post-10851442)
 * Hi [@marcebcn](https://wordpress.org/support/users/marcebcn/),
 * Great. If you like the plugin, [leave us a review.](https://wordpress.org/support/plugin/cookie-law-info/reviews/#new-post)
 *  [Gustavo Troisi](https://wordpress.org/support/users/gus0074/)
 * (@gus0074)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/errors-on-non-admin-user/#post-10853066)
 * Fixed now! many thanks guys! great work

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘Errors on non admin user’ is closed to new replies.

 * ![](https://ps.w.org/cookie-law-info/assets/icon.svg?rev=3007243)
 * [CookieYes – Cookie Banner for Cookie Consent (Easy to setup GDPR/CCPA Compliant Cookie Notice)](https://wordpress.org/plugins/cookie-law-info/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cookie-law-info/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cookie-law-info/)
 * [Active Topics](https://wordpress.org/support/plugin/cookie-law-info/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cookie-law-info/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cookie-law-info/reviews/)

## Tags

 * [bugs](https://wordpress.org/support/topic-tag/bugs/)

 * 12 replies
 * 7 participants
 * Last reply from: [Gustavo Troisi](https://wordpress.org/support/users/gus0074/)
 * Last activity: [7 years, 6 months ago](https://wordpress.org/support/topic/errors-on-non-admin-user/#post-10853066)
 * Status: resolved