-
I’ve been running my cron from wp-cli for years
WP_CLI_CONFIG_PATH="$WP_PATH/wp-cli.yml" /usr/local/bin/wp --path="$WP_PATH" cron event run --due-now
As of recent upgrade, once again FV FlowPlayer is inappropriately playing around with globals, this time
global $FV_Player_Checker
infv_wp_flowplayer_save_post()
:[18-Sep-2018 07:20:06 UTC] PHP Fatal error: Uncaught Error: Call to a member function queue_check() on null in /home/warmpress/wp-content/plugins/fv-wordpress-flowplayer/models/flowplayer.php:2120
Stack trace:
#0 /home/warmpress/wp-content/plugins/fv-wordpress-flowplayer/models/checker.php(322): fv_wp_flowplayer_save_post(457478)
#1 /home/warmpress/wp-includes/class-wp-hook.php(286): FV_Player_Checker->checker_cron()
#2 /home/warmpress/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(”, Array)
#3 /home/warmpress/wp-includes/plugin.php(515): WP_Hook->do_action(Array)
#4 /home/leho/wp-cli/vendor/wp-cli/cron-command/src/Cron_Event_Command.php(288): do_action_ref_array(‘fv_flowplayer_c…’, Array)
#5 /home/leho/wp-cli/vendor/wp-cli/cron-command/src/Cron_Event_Command.php(259): Cron_Event_Command::run_event(Object(stdClass))
#6 [internal function]: Cron_Event_Command->run(Array, Array)
#7 /home/leho/wp-cli/php/WP_CLI/Dispatcher/CommandFactory.php(89): call_user_func(Array, Array, Array)
#8 [internal function]: WP_CLI\Dispatcher\CommandFactory::WP in /home/warmpress/wp-content/plugins/fv-wordpress-flowplayer/models/flowplayer.php on line 2120I fail to understand why post save actions are even used in some utility cron function. This smells like bad architecture, why wouldn’t options work here, or what am I missing?