• hello,

    i use the last version of wp and mb-relationships.
    I create a simple plugin for use and declare Relationships like this :

    MB_Relationships_API::register( array(
    		        'id'   => 'projet_to_contact',
    		        'from' => array(
    		            'object_type' => 'post',
    		            'post_type'   => 'emf_projets',
    		            'meta_box'    => array(
    		                'title'       => 'Contact lié',
    		                'context'       => 'normal',
    		                'field_title' => 'Select contact',
    		            ),
    		        ),
    		        'to'   => array(
    		            'object_type' => 'post',
    		            'post_type'   => 'emf_contact',
    		            'meta_box'    => array(
    		                'title'         => 'Projets lié',
    		                'context'       => 'side',
    		                'field_title' => 'Select Projet',
    		            ),
    		        ),
    		    ) );

    when i use the native WP function wp_delete_post(); i have 15 Warning :

    Warning: Illegal string offset ‘object_type’ in /home/emf/public_html/dev.emf.fr/wp-content/plugins/mb-relationships/inc/class-mb-relationships-relationship.php on line 148

    And the post is not deleted…

    Can you help me ?

    • This topic was modified 6 years, 6 months ago by adrientopall.
  • The topic ‘erreur with wp_delete_post($id_post, true)’ is closed to new replies.