Javascript 'Missing semicolon' with custom content PHP files

General discussion on Zend Studio
Post Reply
shrimpwagon
Posts: 2
Joined: Fri Jan 25, 2013 7:14 pm

Javascript 'Missing semicolon' with custom content PHP files

Post by shrimpwagon » Fri Jan 25, 2013 7:23 pm

I am using CakePHP therefore I have set .ctp files to be of content type PHP.

Preferences->General->Content Types->Text->PHP Content Type
Add..
*.ctp

Validation is marking all var functions as needing a semicolon after the close brace.

Ex:

Code: Select all

	var remove_row = function($target) {
		if($('#dataTable tbody tr').length == 1) return;
		$target.parent().remove();
		reorder();
		onDataChange();
	} // MARKS LINE AS MISSING SEMICOLON
Yes, I have completely turned off ALL Javascript validation. I only have PHP validation on. When I make the .ctp file content type HTML the problem goes away but obvisouly any PHP scripting is not colored. I promise I did everything right; something is wacked out.

Please help.

Thank you.

User avatar
natalia_b_zend
Posts: 366
Joined: Wed Jan 25, 2012 5:51 pm

Re: Javascript 'Missing semicolon' with custom content PHP f

Post by natalia_b_zend » Mon Feb 18, 2013 6:52 pm

Could you send us the whole .ctp file you're working on?
Natalia Bartol
Zend Studio Team

Post Reply