• 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

    (@weblizar)

    Hello @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.

    Hello @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 3 years, 4 months ago by 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.