Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reference: Splat syntax is converted to a single argument #1484

Closed
sebastiangreger opened this issue Sep 16, 2021 · 1 comment
Closed

Reference: Splat syntax is converted to a single argument #1484

sebastiangreger opened this issue Sep 16, 2021 · 1 comment
Assignees
Labels
type: bug 🐛 Is a bug; fixes a bug

Comments

@sebastiangreger
Copy link
Contributor

https://getkirby.com/docs/reference/objects/cms/site/find states that ->find() expects a string, but this also works with an array of page IDs (e.g. the pages() helper does that).

As an additional note: the reference does not indicate that ->find() only finds published pages (listed/unlisted) but not drafts.

@lukasbestle
Copy link
Member

In the code we have hinted this argument as string ...$arguments, which is correct. @distantnative I think the reference converts this syntax to string $arguments = null, which seems like a bug to me.

Regarding the note about drafts: You are right, I have fixed it in the code: getkirby/kirby#3791

@lukasbestle lukasbestle changed the title Small omissions in ->find() reference Reference: Splat syntax is converted to a single argument Oct 11, 2021
@distantnative distantnative reopened this Nov 16, 2021
@distantnative distantnative added the type: bug 🐛 Is a bug; fixes a bug label Mar 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug 🐛 Is a bug; fixes a bug
Projects
None yet
Development

No branches or pull requests

3 participants