• Resolved FlupkeDe

    (@flupkede)


    When you see these messages in the php error log:
    PHP Notice: Undefined index: page in form-lightbox/admin-page.php on line 36
    PHP Notice: Undefined index: page in form-lightbox/admin-page.php on line 106
    PHP Notice: Undefined index: status in form-lightbox/admin-page.php on line 566

    you can easily fix them by modifying as follows:
    Adjust line 36 :
    From:
    if ( $_GET[‘page’] != null && $_GET[‘page’] == $this->page_id ) {
    To:
    if ( isset($_GET[‘page’]) && $_GET[‘page’] == $this->page_id ) {

    Adjust line 106 :
    From:
    if ( $_GET[‘page’] != null && $_GET[‘page’] !== $this->page_id )
    To:
    if ( isset($_GET[‘page’]) && $_GET[‘page’] !== $this->page_id )

    Adjust line 566 :
    From:
    if( $value[‘id’] != null && strpos($value[‘id’], ‘_’ . $type . ‘_’) !== false ….
    To:
    if( isset($value[‘id’]) && isset($value[‘status’]) && strpos($value[‘id’], ‘_’ . $type . ‘_’) !== false …

    This will resolve all errors

    https://ww.wp.xz.cn/plugins/form-lightbox/

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

    (@agneslesagegmailcom)

    Thanks you so much for sharing this !
    Just one fix, in the latest version of the plugin I used, line 566 seems different, but the correction still works

    //if( strpos($value['id'], '_' . $type . '_') !== false && strpos($value['status'], 'option') !== false ) {
    if( isset($value['id']) && isset($value['status']) && strpos($value['id'], '_' . $type . '_') !== false) {
    Agnes

    (@agneslesagegmailcom)

    PS: however, I still get this error:

    Strict Standards: Redefining already defined constructor for class FormLightboxAdmin in /home/clients…/wp-content/plugins/form-lightbox/admin-page.php on line 28

    Agnes

    (@agneslesagegmailcom)

    PS :it seems commenting the referred lines does not cause a problem (might be for earlier versions..?)

    // function FormLightboxAdmin() { $this->__construct(); }

    /**
    * PHP 5 Constructor
    */

    // function __construct() {
    // add_action( ‘admin_menu’, array( &$this, ‘add_setting_menu’ ) );
    // add_action( ‘admin_head’, array( &$this, ‘add_setting_head’ ) );
    // }

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

The topic ‘PHP errors in the log’ is closed to new replies.