Call to member function hidden on null
-
When trying to broadcast programmatically from within a script recently, regular users have been seeing a critical WordPress error.
Stack trace shows the following:
Notice: Undefined variable: custom_fields_input in /var/www/html/dev.cornwall/wp-content/plugins/threewp-broadcast/src/traits/meta_boxes.php on line 232 Fatal error: Uncaught Error: Call to a member function hidden() on null in /var/www/html/dev.cornwall/wp-content/plugins/threewp-broadcast/src/traits/meta_boxes.php:232 Stack trace: #0 /var/www/html/dev.cornwall/wp-includes/class-wp-hook.php(287): threewp_broadcast\ThreeWP_Broadcast->threewp_broadcast_prepare_meta_box(Object(threewp_broadcast\actions\prepare_meta_box)) #1 /var/www/html/dev.cornwall/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters('', Array) #2 /var/www/html/dev.cornwall/wp-includes/plugin.php(478): WP_Hook->do_action(Array) #3 /var/www/html/dev.cornwall/wp-content/plugins/threewp-broadcast/src/sdk/wordpress/actions/action.php(46): do_action('threewp_broadca...', Object(threewp_broadcast\actions\prepare_meta_box)) #4 /var/www/html/dev.cornwall/wp-content/plugins/threewp-broadcast/src/broadcasting_data.php(330): plainview\sdk_broadcast\wordpress\actions\action->execute() #5 /var/www/html/dev.cornwall/wp-content/plugins/threewp-broadcast/src/broadcasting_data.php(453): threewp_broadcast\broadcastin in /var/www/html/dev.cornwall/wp-content/plugins/threewp-broadcast/src/traits/meta_boxes.php on line 232The code being used to broadcast is as follows:
ThreeWP_Broadcast()->api()->broadcast_children($thispost, [1]);The variable $thispost resolves to a post ID number.
This only started happening after the latest update and only happens when the script is run by a lower level user. When admin users run the script, it functions without an issue.
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
The topic ‘Call to member function hidden on null’ is closed to new replies.