Title: Warning: Trying to access array
Last modified: December 19, 2023

---

# Warning: Trying to access array

 *  [Brisch](https://wordpress.org/support/users/brisch/)
 * (@brisch)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/warning-trying-to-access-array/)
 * Hello, I get the following message at the top of the content after the subscriber
   confirms per emails:
   **Warning**: Trying to access array offset on value of type
   bool in **/srv/www/3/9/7/3977/www/www.andersreisen.at/htdocs/wp-content/themes/
   fluida-plus/cryout/prototypes.php** on line **913**
 * ![](https://i0.wp.com/www.andersreisen.at/wp-content/uploads/2023/12/MailPoet-
   Anmeldung.png?ssl=1)
 * Do you have any idea why? THANKS! Blessings, [@brisch](https://wordpress.org/support/users/brisch/)
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fwarning-trying-to-access-array%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Thread Starter [Brisch](https://wordpress.org/support/users/brisch/)
 * (@brisch)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/warning-trying-to-access-array/#post-17290118)
 * This is line 913:
 *     ```wp-block-code
       $output .= '<a href="' . $homeUrl . '/' . $slug['slug'] . '/">' . $post_type->labels->singular_name . '</a>';
       ```
   
 *  Plugin Support [Kel C. a11n](https://wordpress.org/support/users/kellymetal/)
 * (@kellymetal)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/warning-trying-to-access-array/#post-17301152)
 * Hi there [@brisch](https://wordpress.org/support/users/brisch/),
 * I see that the warning is being reported from a file in your Fluida Plus theme.
 * From the warning message `Trying to access array offset on value of type bool`,
   it sounds like the code is trying to access an array value on a variable that’s
   type `boolean`, rather than an array. In the line of code you shared, the only
   part that seems related is the `$slug['slug']` part.
 * It’s hard to say for sure, but it seems at that point in the code when loading
   the Subscription confirmation page, $slug is set to a boolean value, resulting
   in that warning being reported. I see the same thing on [the Captcha page](https://www.andersreisen.at/?mailpoet_page=subscriptions&mailpoet_router&endpoint=subscription&action=captcha&data=eyJjYXB0Y2hhX3Nlc3Npb25faWQiOiJpM2RkZWUyMmU3NGtjbzg0Z3N3OGcwOGdvNGtjbzB3dyJ9)
   after submitting your subscription form as well. It’s likely since the MailPoet
   pages don’t actually have slugs, just URLs going through the `mailpoet_router`
   function like `https://www.andersreisen.at/?mailpoet_page=subscriptions&mailpoet_router&
   endpoint=subscription...`
 * That said, please note that it is just a warning message, so you could disable
   WP Debug to not display the message on your site’s frontend: [https://wordpress.org/documentation/article/debugging-in-wordpress/](https://wordpress.org/documentation/article/debugging-in-wordpress/)
 * Alternatively, you could reach out to your theme developer to ask about having
   the code in the theme files updated to handle that.
 * I hope this helps! Please let me know if you have any questions.
 *  Thread Starter [Brisch](https://wordpress.org/support/users/brisch/)
 * (@brisch)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/warning-trying-to-access-array/#post-17303326)
 * Thanks for your answer! Maybe I should use another theme.
   Blessings, Brisch

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

The topic ‘Warning: Trying to access array’ is closed to new replies.

 * ![](https://ps.w.org/mailpoet/assets/icon-256x256.png?rev=3284564)
 * [MailPoet - Newsletters, Email Marketing, and Automation](https://wordpress.org/plugins/mailpoet/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/mailpoet/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/mailpoet/)
 * [Active Topics](https://wordpress.org/support/plugin/mailpoet/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/mailpoet/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/mailpoet/reviews/)

## Tags

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

 * 3 replies
 * 2 participants
 * Last reply from: [Brisch](https://wordpress.org/support/users/brisch/)
 * Last activity: [2 years, 5 months ago](https://wordpress.org/support/topic/warning-trying-to-access-array/#post-17303326)
 * Status: not resolved