Skip to content

NullPage parent() method returns null, should return NullPage #1986

Open
@16th-earl

Description

@16th-earl

Short description of the issue

When applied to a NullPage object, the parent() method returns null.

Expected behavior

A NullPage object should be returned (same as the rootParent() method returns NullPage).

Actual behavior

null is returned.

Steps to reproduce the issue

$home = $pages->get('/');
var_dump($home->parent); // returns NullPage
var_dump($home->parent->parent); // returns null

Setup/Environment

  • ProcessWire version: 3.0.226

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions