Page 3 of 4
Re: Multisite User delete error
Posted: Fri Mar 11, 2022 10:44 am
by axew3
So, the unique problem that can cause the issue (string error on query) is the fact that a var (with email value) is passed on query without being correctly parsed.
something like this return the error you report:
while
or
Code: Select all
$user_email = $user_email;
'$user_email'
are ok.
little changed the two code functions, to avoid, i think, any possible fail, and also improve the by_email function to execute the search as LOWER value. Here we go, i am sure (like the fact i had already fixed these... really i already fixed last time but i find out the code has been like reverted sometime for some reason.....!) ... let see now ... all strings correctly escaped
https://plugins.trac.wordpress.org/expo ... -phpbb.php
Re: Multisite User delete error
Posted: Sat Mar 12, 2022 5:04 pm
by pennymachines
I'm afraid I'm still getting the error with the new version of class.wp.w3all-phpbb.php
Code: Select all
Fatal error: Uncaught Error: Call to a member function get_results() on string in /home/www/mysite.com/WP/wp-content/plugins/wp-w3all-phpbb-integration/class.wp.w3all-phpbb.php:1805 Stack trace: #0 /home/www/mysite.com/WP/wp-content/plugins/wp-w3all-phpbb-integration/class.wp.w3all-phpbb.php(1853): WP_w3all_phpbb::wp_w3all_get_phpbb_user_info_by_email(NULL) #1 /home/www/mysite.com/WP/wp-content/plugins/wp-w3all-phpbb-integration/wp_w3all.php(1138): WP_w3all_phpbb::wp_w3all_phpbb_delete_user_signup(2904) #2 /home/www/mysite.com/WP/wp-includes/class-wp-hook.php(309): w3all_wpmu_delete_user(2904) #3 /home/www/mysite.com/WP/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters('', Array) #4 /home/www/mysite.com/WP/wp-includes/plugin.php(474): WP_Hook->do_action(Array) #5 /home/www/mysite.com/WP/wp-admin/includes/ms.php(173): do_action('wpmu_delete_use...', 2904, Object(WP_User)) #6 /home/www/mysite.com/WP/wp-ad in /home/www/mysite.com/WP/wp-content/plugins/wp-w3all-phpbb-integration/class.wp.w3all-phpbb.php on line 1805
Re: Multisite User delete error
Posted: Sat Mar 12, 2022 9:26 pm
by axew3
I have try it anyway, without any error. But i will follow just this night and tomorrow on testing as doing 2.6.0 release
By the way, the function
wp_w3all_get_phpbb_user_info_by_email
has been updated because like last time
i had updated it to be this:
Code: Select all
public static function wp_w3all_get_phpbb_user_info_by_email($email){
global $w3all_config,$w3all_phpbb_connection;
$email = sanitize_email($email);
if( !is_email($email) ) {
return false;
}
$email = strtolower($email);
$phpbb_user = $w3all_phpbb_connection->get_results("SELECT *
FROM ". $w3all_config["table_prefix"] ."groups
JOIN ". $w3all_config["table_prefix"] ."users ON LOWER(". $w3all_config["table_prefix"] ."users.user_email) = '$email'
AND ". $w3all_config["table_prefix"] ."users.group_id = ". $w3all_config["table_prefix"] ."groups.group_id");
return $phpbb_user;
}
while i have found into repository file, this code (which anyway into my test work fine):
Code: Select all
public static function wp_w3all_get_phpbb_user_info_by_email($email){
global $w3all_config,$w3all_phpbb_connection;
$phpbb_user = $w3all_phpbb_connection->get_results("SELECT *
FROM ". $w3all_config["table_prefix"] ."groups
JOIN ". $w3all_config["table_prefix"] ."users ON LOWER(". $w3all_config["table_prefix"] ."users.user_email) = '".$email."'
AND ". $w3all_config["table_prefix"] ."users.group_id = ". $w3all_config["table_prefix"] ."groups.group_id");
return $phpbb_user;
}
so i start to think there is something that is going wrong somewhere, i double checked it now (class.wp.w3all-phpbb.php):
https://plugins.trac.wordpress.org/expo ... -phpbb.php
it has been updated. With this, i assume it is impossible to get the error now, but let see the entire stack, let know please
Re: Multisite User delete error
Posted: Sun Mar 13, 2022 2:02 pm
by pennymachines
Good news! No error.
Thank you so much for all your work on this.
Re: Multisite User delete error
Posted: Sun Mar 13, 2022 5:10 pm
by axew3
wow, finally, you know when you report some bug i go into panic now
i will follow to optimize all the stack and functions, i've seen some that are REALLY still asking to be CLEANED UP!
2.6.0 is coming David
It will fix several things about avatars, add widget online users and phpBB stats and several more improvements!
Re: Multisite User delete error
Posted: Thu Mar 31, 2022 3:48 pm
by pennymachines
Sorry to report with Version 2.6.1 the problem is back:
Code: Select all
Fatal error: Uncaught Error: Call to a member function get_results() on string in /home/www/mysite.com/wp/wp-content/plugins/wp-w3all-phpbb-integration/class.wp.w3all-phpbb.php:1758 Stack trace: #0 /home/www/mysite.com/wp/wp-content/plugins/wp-w3all-phpbb-integration/class.wp.w3all-phpbb.php(1805): WP_w3all_phpbb::wp_w3all_get_phpbb_user_info_by_email('adrien_dulac166...') #1 /home/www/mysite.com/wp/wp-content/plugins/wp-w3all-phpbb-integration/wp_w3all.php(1132): WP_w3all_phpbb::wp_w3all_phpbb_delete_user_signup(3898) #2 /home/www/mysite.com/wp/wp-includes/class-wp-hook.php(309): w3all_wpmu_delete_user(3898) #3 /home/www/mysite.com/wp/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters('', Array) #4 /home/www/mysite.com/wp/wp-includes/plugin.php(474): WP_Hook->do_action(Array) #5 /home/www/mysite.com/wp/wp-admin/includes/ms.php(173): do_action('wpmu_delete_use...', 3898, Object(WP_User)) #6 /home/www/mysite.co in /home/www/mysite.com/wp/wp-content/plugins/wp-w3all-phpbb-integration/class.wp.w3all-phpbb.php on line 1758