Title: PHP Warning: Trying to access array offset on value of type bool
Last modified: June 3, 2021

---

# PHP Warning: Trying to access array offset on value of type bool

 *  [Larry Daniele](https://wordpress.org/support/users/larrydaniele/)
 * (@larrydaniele)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/php-warning-trying-to-access-array-offset-on-value-of-type-bool/)
 * I’m seeing these PHP warnings on an up-to-date WordPress installation running
   on PHP 8:
 * [Jun 03, 03:56:02] PHP Warning: Trying to access array offset on value of type
   bool in /wp-content/plugins/admin-custom-login/init.php on line 257
    [Jun 03,
   03:56:02] PHP Warning: Trying to access array offset on value of type bool in/
   wp-content/plugins/admin-custom-login/init.php on line 258
 * that relates to this block of code:
 *     ```
       		<?php
       			$g_page = unserialize(get_option('Admin_custome_login_gcaptcha'));
       			$site_key = $g_page['site_key'];
       			$secret_key = $g_page['secret_key'];
       		?>
       ```
   
 * I’m guessing that if the “Admin_custome_login_gcaptcha” option is not there, 
   it returns a bool value of ‘false’ that is then trying to be accessed as an array.
   Perhaps an “if ( is_array( $g_page ) )” around the two assignments would avoid
   this.
 * I’m not seeing any user-facing problems due to this, so it’s not urgent. Just
   some housekeeping, perhaps.
 * Thanks for a great plugin!

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

 *  Plugin Author [Weblizar – WordPress Themes & Plugin](https://wordpress.org/support/users/weblizar/)
 * (@weblizar)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/php-warning-trying-to-access-array-offset-on-value-of-type-bool/#post-14520060)
 * Hello [@larrydaniele](https://wordpress.org/support/users/larrydaniele/)
 * Thanks for using our plugin.
    Sorry about this we will release the php 8.0 tested
   version soon currently its only tested up to php 7.4.
 * Thanks and best regards.
 *  [MarkoAmb](https://wordpress.org/support/users/markoamb/)
 * (@markoamb)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/php-warning-trying-to-access-array-offset-on-value-of-type-bool/#post-15019803)
 * Hello [@weblizar](https://wordpress.org/support/users/weblizar/) ,
    is the plugin“
   Admin Custom Login” php8.0 tested version ready or not yet? If I change the server
   to use php8.0 then I got error on login screen
 *     ```
       jQuery(document).ready(function(){ jQuery('html body').attr('id', 'screen'); jQuery('#loginform label[for="user_login"]').attr('id', 'lable_login_input'); jQuery('#loginform label[for="user_pass"]').attr('id', 'lable_password_input'); jQuery('#loginform p').attr('id', 'lable_login_input'); jQuery('#loginform p.forgetmenot').attr('id', 'forgetmenot_input'); jQuery('#loginform p.submit').attr('id', 'submit_input'); jQuery('#loginform .user-pass-wrap').attr('id', 'lable_password_input'); if (jQuery('#lable_login_input').length) { document.getElementById("lable_login_input").innerHTML="Username / Email"; document.getElementById("lable_password_input").innerHTML="Password";
       jQuery('body.login div#login form .input, .login input[type="text"]').css('padding','5px 5px 5px 45px'); }
       ```
   
    -  This reply was modified 4 years, 6 months ago by [MarkoAmb](https://wordpress.org/support/users/markoamb/).

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

The topic ‘PHP Warning: Trying to access array offset on value of type bool’ is 
closed to new replies.

 * ![](https://ps.w.org/admin-custom-login/assets/icon-256x256.png?rev=1121656)
 * [Admin Custom Login](https://wordpress.org/plugins/admin-custom-login/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/admin-custom-login/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/admin-custom-login/)
 * [Active Topics](https://wordpress.org/support/plugin/admin-custom-login/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/admin-custom-login/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/admin-custom-login/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [MarkoAmb](https://wordpress.org/support/users/markoamb/)
 * Last activity: [4 years, 6 months ago](https://wordpress.org/support/topic/php-warning-trying-to-access-array-offset-on-value-of-type-bool/#post-15019803)
 * Status: not resolved