Syntax errors in valid Wordpress code since last update
8 posts
• Page 1 of 1
Syntax errors in valid Wordpress code since last update
Hello,
I'm encountering a strange issue. Till the last update (1.20.9074) VS displays many syntax error only in WordPress Code (only theme or plugin that work perfectly).
For example, in this code :
I get : "Syntax error: unexpected token 'endif'.
I have around 20 errors like that. There are all related to if-else blocks (either for the "elseif" keyword, either for the "endif" keyword that is sometimes used) except one error related to the protected keyword in the statement :
PHP version configuration issue ?
Thank you for your help.
I'm encountering a strange issue. Till the last update (1.20.9074) VS displays many syntax error only in WordPress Code (only theme or plugin that work perfectly).
For example, in this code :
- Code: Select all
if( $field['field_type'] == 'multi_select' )
{
$field['multiple'] = 1;
$field['field_type'] = 'select';
$field['name'] .= '[]';
}
elseif( $field['field_type'] == 'checkbox' )
{
$field['name'] .= '[]';
}
I get : "Syntax error: unexpected token 'endif'.
I have around 20 errors like that. There are all related to if-else blocks (either for the "elseif" keyword, either for the "endif" keyword that is sometimes used) except one error related to the protected keyword in the statement :
- Code: Select all
protected $remote = null;
PHP version configuration issue ?
Thank you for your help.
- PatriceOngla
- Posts: 27
- Joined: September 1st, 2015, 5:10 pm
Re: Syntax errors in valid Wordpress code since last update
Hello!
Thank you for letting us know. Could you please send us the whole source file where this happens?
You can attach it here or if you'd prefer send it to our email info@devsense.com
Thank you so much,
Thank you for letting us know. Could you please send us the whole source file where this happens?
You can attach it here or if you'd prefer send it to our email info@devsense.com
Thank you so much,
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbeno │ miloslav@devsense.com
-
Miloslav Beno - Posts: 1252
- Joined: January 7th, 2012, 8:36 pm
Re: Syntax errors in valid Wordpress code since last update
Hi Miroslav,
Thanx for your quick answer. Here is one of the source files where those errors occurs (and a screen copy). Please note that if I rewrite the same condition statement, the error disappears. So there is probably nothing wrong with the source code itself. But here it is.
I probably messed up something somewhere but I really can't figure what.
Regards.
Thanx for your quick answer. Here is one of the source files where those errors occurs (and a screen copy). Please note that if I rewrite the same condition statement, the error disappears. So there is probably nothing wrong with the source code itself. But here it is.
I probably messed up something somewhere but I really can't figure what.
Regards.
You do not have the required permissions to view the files attached to this post.
- PatriceOngla
- Posts: 27
- Joined: September 1st, 2015, 5:10 pm
Re: Syntax errors in valid Wordpress code since last update
Hello,
Thank you for providing us with detailed information. You can download a fixed version https://www.devsense.com/download
Let us know if it works for you!
Cheers,
Thank you for providing us with detailed information. You can download a fixed version https://www.devsense.com/download
Let us know if it works for you!
Cheers,
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbeno │ miloslav@devsense.com
-
Miloslav Beno - Posts: 1252
- Joined: January 7th, 2012, 8:36 pm
Re: Syntax errors in valid Wordpress code since last update
Hi,
The version has fixed the issue for me. Thanx for having done so quick.
Just by curiosity, what kind of problem was it ?
The version has fixed the issue for me. Thanx for having done so quick.
Just by curiosity, what kind of problem was it ?
- PatriceOngla
- Posts: 27
- Joined: September 1st, 2015, 5:10 pm
Re: Syntax errors in valid Wordpress code since last update
Hi,
Great!
The issue was that our new parser wasn't handling correctly a case when there was ? in the comment followed by unix format new line
Now this cases is covered by test so it will never happen again.
Thanks again and have a great day,
Great!
The issue was that our new parser wasn't handling correctly a case when there was ? in the comment followed by unix format new line
Now this cases is covered by test so it will never happen again.
Thanks again and have a great day,
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbeno │ miloslav@devsense.com
-
Miloslav Beno - Posts: 1252
- Joined: January 7th, 2012, 8:36 pm
Re: Syntax errors in valid Wordpress code since last update
Perfect. And congratulations for your tool and its support !
Cheers.
Cheers.
- PatriceOngla
- Posts: 27
- Joined: September 1st, 2015, 5:10 pm
Re: Syntax errors in valid Wordpress code since last update
Thank you!
Have a great day,
Have a great day,
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbeno │ miloslav@devsense.com
-
Miloslav Beno - Posts: 1252
- Joined: January 7th, 2012, 8:36 pm
8 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 46 guests