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

Failed to catch: Fatal error: Cannot use $this as parameter in ... #130

Open
stuntdawg opened this issue Sep 6, 2017 · 1 comment
Open

Comments

@stuntdawg
Copy link

this will fail when I run code on a server with php 7, but will not display this as a problem when I run php7cc. I had this in several files and it gave me greens across the board.

function randomName($this) {
    $do = $this;
    return $do;
}
@sstalle
Copy link
Owner

sstalle commented Sep 11, 2017

Looks like this was introduced in 7.1. I haven't made up my mind yet on adding checks for the BC breaks introduced in 7.1 and 7.2. It seems like there aren't many of them that could be detected by static analysis (at the level php7cc does it).

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

2 participants