Skip to content

Use of undefined $post_parent variable #279

@timotheemoulin

Description

@timotheemoulin

$translated_parent = $this->getAllTranslations($post_parent)[$lang_code]->element_id;

the $post_parent variable is missing from the method definition.

The correct definition should be

/**
     * Sync Post Order among translations
     * @param array of posts with children
     * @param int value of the parent ID
     */
	public function syncPostOrder($posts, $post_parent = 0)
	{
		...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions