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

Functionlist breaks with this small string for php files #5150

Closed
TheiAndy opened this issue Dec 18, 2018 · 2 comments
Closed

Functionlist breaks with this small string for php files #5150

TheiAndy opened this issue Dec 18, 2018 · 2 comments

Comments

@TheiAndy
Copy link

TheiAndy commented Dec 18, 2018

Description of the Issue

I looked over the other Functionlist issues and didn't see this particular problem. I believe I've broken it down as much as possible:

Functionlist has an issue showing any functions inside classes when this string is present (and the functions are private, protected or public) in a php file:

$string = "\"{";

Steps to Reproduce the Issue

  1. Create a test.php file
  2. copy paste the following into it:
<?php
class test{
	protected function blah(){
		$string="\"{";
	}
}
?>
  1. Save the file, then look at the function list. Next, take out the word "protected" or comment out the string, save, and then the function list works again.

Expected Behavior

I was expecting it to show the functions in the file even with that string in the function. I can work around it by adding a chr(123) to any string that needs an open bracket (and is followed by an escaped double quotes), but it would be nice if I didn't have to do that.

Actual Behavior

No functions were shown in the list.

@MAPJe71
Copy link
Contributor

MAPJe71 commented Dec 18, 2018

Please try my updated PHP parser posted here.

@TheiAndy
Copy link
Author

TheiAndy commented Dec 19, 2018

Hi MAPJe71, it works fine with your parser. I'll use your parser and let you know if any issues come up with it. Thanks for making that.

Just FYI, I had to copy old header for the parser, then copy paste the commentExpr from the new one to get it to work. (I'm guessing because I didn't change anything else besides the parser)

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

Successfully merging a pull request may close this issue.

2 participants