parameter 2 to be array
-
After installing the plugin . I get an error on top of the dashbord page as follows
“parameter 2 to be array, string given in /home/tooga/public_html/wp-content/plugins/wp-sort-order/inc/hooks.php on line 873“<br/>
Below copy of Hooks.php file starting on line 869 taken from my cpanel:<br/>
**********************************************************
868-$wpso_objects = isset( $wpso_options[‘objects’] ) ? $wpso_options[‘objects’] : array();
869-
870-
871- global $wpdb;
872-
873- if(!$post->menu_order && in_array( $post->post_type, $wpso_objects )){
874- $sql = ‘SELECT MAX(menu_order) FROM ‘.$wpdb->posts.’
875- WHERE post_type = “‘.$post->post_type.'” ‘;
$max = $wpdb->get_var($sql);
if($max>0){
wp_update_post(array(
‘ID’=>$post->ID,
‘menu_order’=>$max+1
));}
}}
add_action(‘admin_footer’, ‘wpso_admin_scripts’, 100);
function wpso_admin_scripts(){
global $wpso_allowed_pages;
************************************************
Can u kindly help with the change of coding since I do not have enough knowledge on php.
Many thanks
- The topic ‘parameter 2 to be array’ is closed to new replies.