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

Trying to get property of non-object #50

Open
tobeorla opened this issue Nov 16, 2017 · 0 comments
Open

Trying to get property of non-object #50

tobeorla opened this issue Nov 16, 2017 · 0 comments

Comments

@tobeorla
Copy link

tobeorla commented Nov 16, 2017

PushApi::log() is static and it requires SLIM container from self::$container to run:
https://github.com/watzenare/PushApi/blob/master/PushApi/PushApi.php#L190

The problem is, that self::$container is filled by __construct which means that it won't be set when you fire PushApi::log()
https://github.com/watzenare/PushApi/blob/master/PushApi/PushApi.php#L51

I made this hack to make it work, but it's just that, a hack:

if ($app == null) {
    echo $level . " - " . $message . "\n";
    return;
}
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