Unexpected token '' -- PHP Tools v1.22.9523.2015
3 posts
• Page 1 of 1
Unexpected token '' -- PHP Tools v1.22.9523.2015
Severity Code Description Project File Line Column Suppression State
Error Syntax error: unexpected token '' RWB forms_select.php 9 1
<?php
if (session_status() == PHP_SESSION_NONE) {
session_start();
}
if(isset($_POST['scan_CT_contrast_consent'])){
$_SESSION['CT_contrast_consent'] = true;
$_POST['currentPage'] = 'CT_contrast_consent';
}else{
if(isset($_SESSION['CT_contrast_consent'])){
unset($_SESSION['CT_contrast_consent']);
}
}
?>
Error is on "}else{" line column 1.
Error Syntax error: unexpected token '' RWB forms_select.php 9 1
<?php
if (session_status() == PHP_SESSION_NONE) {
session_start();
}
if(isset($_POST['scan_CT_contrast_consent'])){
$_SESSION['CT_contrast_consent'] = true;
$_POST['currentPage'] = 'CT_contrast_consent';
}else{
if(isset($_SESSION['CT_contrast_consent'])){
unset($_SESSION['CT_contrast_consent']);
}
}
?>
Error is on "}else{" line column 1.
- Blitzstromunger
- Posts: 3
- Joined: February 22nd, 2017, 5:46 pm
Re: Unexpected token '' -- PHP Tools v1.22.9523.2015
It appears this only occurs when the page also contains nested html and if statements, like:
<?php
if(true){
?>
<html>
<?php
if (false){
?>
</html>
<?php
}
}
?>
<?php
if(true){
?>
<html>
<?php
if (false){
?>
</html>
<?php
}
}
?>
- Blitzstromunger
- Posts: 3
- Joined: February 22nd, 2017, 5:46 pm
Re: Unexpected token '' -- PHP Tools v1.22.9523.2015
Please mostly ignore this post, it was a dangling curly bracket causing the issue. It would be nice if it tracked the line number a little better, it appears to only count lines of php code, not html.
- Blitzstromunger
- Posts: 3
- Joined: February 22nd, 2017, 5:46 pm
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 53 guests