php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24475 HTML.tpl is written with short_tag
Submitted: 2003-07-03 04:34 UTC Modified: 2003-07-16 16:29 UTC
From: akimoto at share360 dot com Assigned: cain (profile)
Status: Closed Package: PEAR related
PHP Version: 4.3.3RC1 OS: Windows XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: akimoto at share360 dot com
New email:
PHP Version: OS:

 

 [2003-07-03 04:34 UTC] akimoto at share360 dot com
Description:
------------
When using PEAR::PHPUnit with GUI mode, it seems to use PHPUnit/GUI/HTML.tpl as a template.

In this template, all PHP tags used are short-type tags (like <?, <?=). So when php.ini prohibits short_tag, it shows error code.

as short_open_tag is not PHP_INI_ALL, in some environment where you may not edit php.ini nor httpd.conf, you can not work around this by changing allowed tags settings.

Most of case it may be acceptable as when you do unit-testing you have control your web server and PHP. But still it is good if the HTML.tpl has long tag (<?php, and <?php echo) which works on all environment. Then you may run PHPUnit tests on the exactly same environment as your deployment server.

Thank you


Reproduce code:
---------------
in php.ini,
short_open_tag = off

and run PHPUnit/GUI/HTML.php

Expected result:
----------------
Test page is shown up correctly.

Actual result:
--------------
in such environment, short tags are not recognized as PHP script, so output of PEAR::PHPUnit/GUI/HTML is corrupted.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-07-16 16:29 UTC] cain@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Oct 17 05:03:32 2021 UTC