Skip to content

Error when passing submenu title #15

Description

@Netkomm

$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 )

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