[Closed] PHP Error on line 346 in classes/Cache.php
Posted by: @robertHi @chingiz,
Please ignore that report. It is related to 2.2.3 version. The issue has been fixed in 2.2.4 version please make sure you've updated your forum.
Ver 2.2.4 returns error when users login.
Line 346 in /wpforo/classes/Cache.php
In case you want to say thank you !)
We'd really appreciate and be thankful if you leave a good review on plugin page. This is the best way to say thank you to this project and support team.
Posted by: @robertPlease provide the entire error message.
Here you are
Thông tin lỗi
================
Có lỗi E_ERROR tại dòng 346 trong file: /home/cuxc4x76ejjy/0toNet.FUN/TrangChinh/DL/wp-content/plugins/wpforo/classes/Cache.php. Thông báo lỗi: Uncaught Error: Typed property wpforo\classes\Cache::$dir must not be accessed before initialization in /home/cuxc4x76ejjy/0toNet.FUN/TrangChinh/DL/wp-content/plugins/wpforo/classes/Cache.php:346
Stack trace:
#0 /home/cuxc4x76ejjy/0toNet.FUN/TrangChinh/DL/wp-content/plugins/wpforo/includes/functions.php(2374): wpforo\classes\Cache->clean()
#1 /home/cuxc4x76ejjy/0toNet.FUN/TrangChinh/DL/wp-content/plugins/wpforo/classes/Members.php(1817): wpforo_clean_cache()
#2 /home/cuxc4x76ejjy/0toNet.FUN/TrangChinh/DL/wp-content/plugins/wpforo/classes/Members.php(109): wpforo\classes\Members->reset()
#3 /home/cuxc4x76ejjy/0toNet.FUN/TrangChinh/DL/wp-includes/class-wp-hook.php(326): wpforo\classes\Members->wpforo\classes\{closure}()
#4 /home/cuxc4x76ejjy/0toNet.FUN/TrangChinh/DL/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#5 /home/cuxc4x76ejjy/0toNet.FUN/TrangChinh/DL/wp-includes/plugin.php(517): WP_Hook->do_action()
#6 /home/cuxc4x76ejjy/0toNet.FUN/TrangChinh/DL/wp-includes/user.php(1921): do_action()
#7 /home/cuxc4x76ejjy/0toNet.FUN/TrangChinh/DL/wp-includes/user.php(2590): clean_user_cache()
#8 /home/cuxc4x76ejjy/0toNet.FUN/TrangChinh/DL/wp-content/plugins/code-snippets/php/snippet-ops.php(582) : eval()'d code(38): wp_update_user()
#9 /home/cuxc4x76ejjy/0toNet.FUN/TrangChinh/DL/wp-includes/class-wp-hook.php(324): check_for_role_change()
#10 /home/cuxc4x76ejjy/0toNet.FUN/TrangChinh/DL/wp-includes/plugin.php(205): WP_Hook->apply_filters()
#11 /home/cuxc4x76ejjy/0toNet.FUN/TrangChinh/DL/wp-content/plugins/mycred/includes/mycred-functions.php(1537): apply_filters()
#12 /home/cuxc4x76ejjy/0toNet.FUN/TrangChinh/DL/wp-content/plugins/mycred/includes/hooks/mycred-hook-logins.php(110): myCRED_Settings->add_creds()
#13 /home/cuxc4x76ejjy/0toNet.FUN/TrangChinh/DL/wp-includes/class-wp-hook.php(324): myCRED_Hook_Logging_In->logging_in()
#14 /home/cuxc4x76ejjy/0toNet.FUN/TrangChinh/DL/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#15 /home/cuxc4x76ejjy/0toNet.FUN/TrangChinh/DL/wp-includes/plugin.php(517): WP_Hook->do_action()
#16 /home/cuxc4x76ejjy/0toNet.FUN/TrangChinh/DL/wp-includes/user.php(121): do_action()
#17 /home/cuxc4x76ejjy/0toNet.FUN/TrangChinh/DL/wp-login.php(1309): wp_signon()
#18 /home/cuxc4x76ejjy/0toNet.FUN/TrangChinh/DL/wp-content/plugins/wps-hide-login/classes/plugin.php(603): require_once('/home/cuxc4x76e...')
#19 /home/cuxc4x76ejjy/0toNet.FUN/TrangChinh/DL/wp-includes/class-wp-hook.php(324): WPS\WPS_Hide_Login\Plugin->wp_loaded()
#20 /home/cuxc4x76ejjy/0toNet.FUN/TrangChinh/DL/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#21 /home/cuxc4x76ejjy/0toNet.FUN/TrangChinh/DL/wp-includes/plugin.php(517): WP_Hook->do_action()
#22 /home/cuxc4x76ejjy/0toNet.FUN/TrangChinh/DL/wp-settings.php(665): do_action()
#23 /home/cuxc4x76ejjy/0toNet.FUN/TrangChinh/DL/wp-config.php(96): require_once('/home/cuxc4x76e...')
#24 /home/cuxc4x76ejjy/0toNet.FUN/TrangChinh/DL/wp-load.php(50): require_once('/home/cuxc4x76e...')
#25 /home/cuxc4x76ejjy/0toNet.FUN/TrangChinh/DL/wp-blog-header.php(13): require_once('/home/cuxc4x76e...')
#26 /home/cuxc4x76ejjy/0toNet.FUN/TrangChinh/DL/index.php(17): require('/home/cuxc4x76e...')
#27 {main}
thrown
Posted by: @realact
I meant version 2.2.3. Because current version causes some errors.
@clbtiengducvietduc you can get any previous version from the link I sent you.
We cannot reproduce this error, I think this is a conflict with some plugin. Could you please send admin login details to support[at]gvectors.com to check your issue?
In case you want to say thank you !)
We'd really appreciate and be thankful if you leave a good review on plugin page. This is the best way to say thank you to this project and support team.
Posted by: @robertWe cannot reproduce this error, I think this is a conflict with some plugin. Could you please send admin login details to support[at]gvectors.com to check your issue?
Yes. But first of all may I have version 2.2.3?
@clbtiengducvietduc At the end of the page using the dropdown, you will get whatever version you need
https://wordpress.org/plugins/wpforo/advanced/
Posted by: @dimalifragis@clbtiengducvietduc At the end of the page using the dropdown, you will get whatever version you need
Thank you so much. 🙂
Posted by: @clbtiengducvietduc#8 /home/cuxc4x76ejjy/0toNet.FUN/TrangChinh/DL/wp-content/plugins/code-snippets/php/snippet-ops.php(582) : eval()'d code(38): wp_update_user()
I see you use some code snippet in Code Snippets plugin and the error comes from that snippet. Please copy paste that code here.
In case you want to say thank you !)
We'd really appreciate and be thankful if you leave a good review on plugin page. This is the best way to say thank you to this project and support team.
@robert tried to reopen my thread but cant 🙁 my site cached ... after clearing still getting below errors 🙁 please advise
Fatal error: Uncaught Error: Typed property wpforo\classes\Cache::$dir must not be accessed before initialization in /home/customer/www/intranet.bobby.org/public_html/wp-content/plugins/wpforo/classes/Cache.php:346 Stack trace: #0 /home/customer/www/intranet.bobby.org/public_html/wp-content/plugins/wpforo/includes/functions.php(2374): wpforo\classes\Cache->clean(2770, 'avatar', Array) #1 /home/customer/www/intranet.bobby.org/public_html/wp-content/plugins/wpforo/classes/Members.php(1817): wpforo_clean_cache('avatar', 2770) #2 /home/customer/www/intranet.bobby.org/public_html/wp-content/plugins/wpforo/classes/Members.php(109): wpforo\classes\Members->reset(2770) #3 /home/customer/www/intranet.bobby.org/public_html/wp-includes/class-wp-hook.php(326): wpforo\classes\Members->wpforo\classes\{closure}(2770) #4 /home/customer/www/intranet.bobby.org/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(2770, Array) #5 /home/customer/www/intranet.bobby.org/public_html/wp- in /home/customer/www/intranet.bobby.org/public_html/wp-content/plugins/wpforo/classes/Cache.php on line 346
@itsupport Open a new topic. Do not hijack an other guy's topic.
Posted by: @robertPosted by: @clbtiengducvietduc#8 /home/cuxc4x76ejjy/0toNet.FUN/TrangChinh/DL/wp-content/plugins/code-snippets/php/snippet-ops.php(582) : eval()'d code(38): wp_update_user()
I see you use some code snippet in Code Snippets plugin and the error comes from that snippet. Please copy paste that code here.
Here you are
/**
* Promote and demote Based on myCRED Balance
* Changes a users role based on their myCRED balance.
* @version 10.7.23
*/
add_filter( 'mycred_add_finished', 'check_for_role_change', 99, 3 );
function check_for_role_change( $reply, $request, $mycred ) {
// Make sure that if any other filter has declined this we also decline
if ( $reply === false ) return $reply;
// Exclude admins and others except normal users and camnoi users
if ( user_can( $request['user_id'], 'manage_options' ) || user_can($request['user_id'], 'editor') || user_can($request['user_id'], 'administrator') || user_can($request['user_id'], 'author') ) return $reply;
extract( $request );
// Minimum balance requirement for each role
$thresholds = array(
'camnoi' => -999999,
'subscriber' => 0
);
// Get users current balance
$current_balance = $mycred->get_users_balance( $user_id, 'mycred_default' );
//$current_balance = $current_balance + $amount;
// Check if the users current balance awards a new role
$new_role = false;
foreach ( $thresholds as $role => $min ) {
if ( $current_balance > $min )
$new_role = $role;
}
// Change users role if we have one
if ( $new_role !== false )
wp_update_user( array(
'ID' => $user_id,
'role' = > $new_role
) );
return $reply;
}
Please update to 2.2.5 version. This issue should be fixed in the new version.
In case you want to say thank you !)
We'd really appreciate and be thankful if you leave a good review on plugin page. This is the best way to say thank you to this project and support team.
-
Sorry, but wpForo - Groups Plugin Integration addon requires the wpForo and Groups plugins to be installed and activated.
3 months ago
-
How to this Php issue?
3 months ago
-
wpForo keeps auto-creating new forum pages even after deletion
3 months ago
-
Forum e-mail system not working
3 months ago
-
CloudFlare not showing wpforo widget updates
4 months ago
- 19 Forums
- 14.2 K Topics
- 71.2 K Posts
- 27 Online
- 6,072 Members