v2.2.15 init function keeps deleting-adding styles
-
Hei,
after updating to 2.2.15 we started to see strange warnings in the logs:
1) Invalid argument supplied for foreach() @/wp-content/plugins/jquery-t-countdown-widget/countdown-timer.php on line 68
2) Deadlock found when trying to get lock; try restarting transaction for query DELETE FROM wp_options WHERE option_name = ‘t-minus_styles’ made by require(‘wp-blog-header.php’), require_once(‘wp-load.php’), require_once(‘wp-config.php’), require_once(‘wp-settings.php’), do_action(‘init’), call_user_func_array, countdown_scripts, delete_optionI tracked it down to this part of init function:
function countdown_scripts(){
$current_version = '2.2.14';
$installed_version = get_option('t-minus_version');if($current_version != $installed_version){
//delete the old style system
delete_option( 't-minus_styles' );
//add version check
update_option('t-minus_version', '2.2.15');//reset rockstar option
delete_option( 'rockstar' );
add_option('rockstar', '');
}
$styles_arr = array("hoth","TIE-fighter","c-3po","c-3po-mini","carbonite","carbonite-responsive","carbonlite","cloud-city","darth","jedi", "sith");
add_option('t-minus_styles', $styles_arr);1) looks like there is old typo and $current_version should be 2.2.15
2) why is add_option for styles outside the version update block?Right now this block gets run every time and the frequent deleting/adding style option causes deadlocks and some clients not getting any style info.
https://www.ads-software.com/plugins/jquery-t-countdown-widget/
- The topic ‘v2.2.15 init function keeps deleting-adding styles’ is closed to new replies.