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

Error when passing submenu title #15

Open
Netkomm opened this issue Aug 8, 2019 · 0 comments
Open

Error when passing submenu title #15

Netkomm opened this issue Aug 8, 2019 · 0 comments

Comments

@Netkomm
Copy link

Netkomm commented Aug 8, 2019

$this->settings->addPages( $this->pages )->withSubPage( 'Dashboard' )->addSubPages( $this->subpages )->register();

Hi Alex, with wordpress 5.22 there is an error that arises from this line of code.

It works if we remove the title ('Dashboard') and pass nothing .

Catchable fatal error: Argument 1 passed to includes\API\SettingsApi::withSubPage() must be an instance of includes\API\string, string given, called in /home/admin/web/[xxx]/public_html/wp-content/plugins/nello-plugin/includes/Pages/Admin.php on line 37 and defined in /home/admin/web/[xxx]/public_html/wp-content/plugins/nello-plugin/includes/API/SettingsApi.php on line 43

with line 43 being

public function withSubPage( string $title = null )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant