You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@16th-earl I agree that makes sense, but NullPage is its own type, and if I look at the phpdoc for the method it says it can only return null, so it appears to be intentional. I don't recall why, but am guessing it's related to parent iteration. I would prefer it to be NullPage, I'll make a note to revisit at a major version when a breaking change for this would be safer.
Short description of the issue
When applied to a
NullPage
object, theparent()
method returnsnull
.Expected behavior
A
NullPage
object should be returned (same as therootParent()
method returnsNullPage
).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
The text was updated successfully, but these errors were encountered: