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

Syntax error in file causes silent failure #38

Open
edhgoose opened this issue Jul 19, 2016 · 0 comments
Open

Syntax error in file causes silent failure #38

edhgoose opened this issue Jul 19, 2016 · 0 comments

Comments

@edhgoose
Copy link

Hi,

One of my team and I have just spent a while hunting down a problem which turned out to be a simple syntax error. He's new to PHP and had written the below in a class:

const C = "Something about " . NameOfClass::class;

We've fixed the problem in our code base, but the thing that caused us a lot of problems was that it worked fine on our local environments (running php 5.6) but not in another environment using php 5.5.

The problem turned out to be a fatal silent error here: https://github.com/schmittjoh/JMSAopBundle/blob/master/DependencyInjection/Compiler/PointcutMatchingPass.php#L116

We did some investigation into why the get_class fails, but couldn't determine a way to catch it. Is there a way of catching a fatal error within get_class, or is there anything that can be done to prevent this sort of problem? Appreciate it's a bit of a niche!

Cheers,
Ed

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