View Issue Details

IDProjectCategoryView StatusLast Update
0011803mantisbtcode cleanuppublic2010-04-23 14:31
Reportermattmccutchen Assigned Tojreese  
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionfixed 
Product Versiongit trunk 
Fixed in Version1.2.1 
Summary0011803: "<?" causes parse error in PHP 5.3.2
Description

I just set up a test Mantis instance from the git trunk with PHP 5.3.2. When I tried to access manage_user_page.php, I got a blank page and the following in the error log:

[error] [client 127.0.0.1] PHP Parse error: syntax error, unexpected $end in /PATH/TO/mantisbt.wt/manage_user_page.php on line 382

I traced the issue to a "<?" that needs to be changed to "<?php". I found another one in admin/system_utils.php with "git grep -E '<\?$'". Please see the attached patch.

TagsNo tags attached.
Attached Files
fix-open-php-tags.patch (791 bytes)   
Change two "<?" to "<?php".

The "<?" causes a parse error in PHP 5.3.2.

diff --git a/admin/system_utils.php b/admin/system_utils.php
index 1964bb4..b6cadab 100644
--- a/admin/system_utils.php
+++ b/admin/system_utils.php
@@ -94,5 +94,5 @@ foreach( $t_dest_ids as $t_id ) {
 	</center></td></tr>
 
 </table>
-<?
+<?php
 	html_page_bottom();
diff --git a/manage_user_page.php b/manage_user_page.php
index f57f4d4..dbf53dc 100644
--- a/manage_user_page.php
+++ b/manage_user_page.php
@@ -330,7 +330,7 @@ for ($i=0;$i<$user_count;$i++) {
 		if ( access_has_global_level( $u_access_level ) ) {
 	?>
 		<a href="manage_user_edit_page.php?user_id=<?php echo $u_id ?>"><?php echo string_display_line( $u_username ) ?></a>
-	<?
+	<?php
 		} else {
 			echo string_display_line( $u_username );
 		}
fix-open-php-tags.patch (791 bytes)   

Activities

jreese

jreese

2010-04-16 09:24

reporter   ~0025147

Fix committed to 1.2.x and master branches.

Related Changesets

MantisBT: master-1.2.x f579b8c0

2010-04-16 09:23

Matt McCutchen

Committer: jreese


Details Diff
Fix 0011803: Use <?php instead of <? tags Affected Issues
0011803
mod - admin/system_utils.php Diff File
mod - manage_user_page.php Diff File

MantisBT: master 00a114d0

2010-04-16 09:23

Matt McCutchen

Committer: jreese


Details Diff
Fix 0011803: Use <?php instead of <? tags Affected Issues
0011803
mod - admin/system_utils.php Diff File
mod - manage_user_page.php Diff File