Skip to content

call_user_func() expects non-static method #2

Description

@marquesine

Why is that? Is it part of the last PHP 7.4 updates?

Setting public static funcion won't cause any future problems?

Also, it is curious that the error is pointed, but the return of the function still appears below it.

Screenshot_2021-02-23 Screenshot

Isn't it better to instatiate SiteController, then call for it?

As follows:

$siteController = new SiteController();
$app->router->get('/contact', [$siteController, 'contact']);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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