Error message after Registration (w3all/phpbbwordpress/ ext 2.0.1)

User avatar
Ezrael
w3 User
w3 User
Posts: 102
Joined: Wed Nov 15, 2023 9:11 pm
Contact:

Error message after Registration (w3all/phpbbwordpress/ ext 2.0.1)

Post by Ezrael »

Code: Select all

[phpBB Debug] PHP Warning: in file [ROOT]/ext/w3all/phpbbwordpress/event/main_listener.php on line 250: Undefined array key "user_new"
Yesterday I saw the following code after hitting the submit button on the registration Page of my phpbb.

PHPBB 3.3.11 with installed phpBB WordPress integration.

The the registration worked like it should but the message showed up. Do you any idea, what's the reason for this?

[TITLE EDITED]
User avatar
axew3
w3all User
w3all User
Posts: 2883
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Error message after Registration

Post by axew3 »

Yes there are warnings errors into the last release of the phpbbwordpress extension

file
/ext/w3all/phpbbwordpress/event/main_listener.php
this line (250):

Code: Select all

if( $e['user_row']['user_new'] != 1 OR $e['user_row']['user_inactive_reason'] != 0 )
should so be instead:

Code: Select all

    if( isset($e['user_row']['user_new']) && $e['user_row']['user_new'] != 1 OR isset($e['user_row']['user_inactive_reason']) && $e['user_row']['user_inactive_reason'] != 0 )
but there is another i've discover yesterday night (same problem, a warning in certain cases)
line 135:

Code: Select all

if(isset($wpBF_ary[$this->user->data['user_id']]){
should be instead:

Code: Select all

if(isset($this->user->data['user_id']) && isset($wpBF_ary[$this->user->data['user_id']])){
also, the redirect after login in phpBB presents some problem, so that at the end of this week it will be released a new fixed version 2.0.2.

Ps you can apply changes into the file, without having to rebuild or delete ext data. Applied changes into the listener file will take effect without further actions
User avatar
axew3
w3all User
w3all User
Posts: 2883
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Error message after Registration (w3all/phpbbwordpress/ ext 2.0.1)

Post by axew3 »

Fixed 2.0.2 has been published, that just apply edits as above mentioned so to avoid Php warnings
viewtopic.php?t=1783
Post Reply