Title: PHP warning: Bool treated as array
Last modified: August 1, 2024

---

# PHP warning: Bool treated as array

 *  Resolved [Knut Sparhell](https://wordpress.org/support/users/knutsp/)
 * (@knutsp)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/php-warning-bool-treated-as-array/)
 * Many of these in my log:
 * `PHP Warning: Trying to access array offset on value of type bool in */wp-content/
   plugins/security-header-generator/work/inc/kcp-cspgen-common.php on line 73`
 * Suggest just replacing 
   `$_opts['apply_child_override']` with (appending a null
   coalescing operator)`$_opts['apply_child_override'] ?? ''` (or any falsey value)
 * PHP 8.2.22
   WP 6.6.1 (multisite)SHG 5.1.29

Viewing 1 replies (of 1 total)

 *  Plugin Author [Kevin Pirnie](https://wordpress.org/support/users/kevp75/)
 * (@kevp75)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/php-warning-bool-treated-as-array/#post-17929517)
 * Next version, there’s more to look at then just that one, so it is going to take
   some time.

Viewing 1 replies (of 1 total)

The topic ‘PHP warning: Bool treated as array’ is closed to new replies.

 * ![](https://ps.w.org/security-header-generator/assets/icon-256x256.png?rev=3128304)
 * [Security Header Generator](https://wordpress.org/plugins/security-header-generator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/security-header-generator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/security-header-generator/)
 * [Active Topics](https://wordpress.org/support/plugin/security-header-generator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/security-header-generator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/security-header-generator/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Kevin Pirnie](https://wordpress.org/support/users/kevp75/)
 * Last activity: [1 year, 10 months ago](https://wordpress.org/support/topic/php-warning-bool-treated-as-array/#post-17929517)
 * Status: resolved