View Issue Details

IDProjectCategoryView StatusLast Update
0001444Main CAcert Websitesource codepublic2022-01-05 01:07
Reporterbdmc Assigned Tobdmc  
Status needs review & testingResolutionopen 
PlatformDefaultOSanyOS Versionany
Target Version2017 Q4 
Summary0001444: Update PHP <? tags appropriately
DescriptionGo through source code and
1. change <?= to <? echo
2. change <? to <?php
3. change each() to foreach()

Additional InformationPart of bug-1260
TagsNo tags attached.
Reviewed by
Test Instructions


child of 0001260 needs workBenBE Make the source compatible with recent PHP versions 



2018-10-30 04:59

developer   ~0005621

Last edited: 2018-11-02 18:05

mysql.php seems to be missing from source code for bug-1260. ( should be in includes/mysql.php )
After discussion, I found that this file is "hand-created" on the appropriate server when the code is deployed.

All other required files appear to be present, but they may not be found in a test system because references to them are absolute paths.


2018-10-30 05:00

developer   ~0005622

There are hard-coded references to "," which can probably cause trouble in development and test systems.


2018-11-02 18:07

developer   ~0005641

This code is now available for testing.


2018-11-02 18:09

developer   ~0005642

I found several thousand ( 2500 - 3000 ) instances of required tag changes. Only one instance of each() in the source code that was derived from "release."


2018-11-02 18:10

developer   ~0005643

The ending "?>" tag, at the bottom of PHP source files can be removed.


2018-11-02 18:16

updater   ~0005644

I think you shuldn't remove the "?>"tag at the bottom of te PHP source files.

This could cause to assume, some sourcecode could be missing.


2018-11-02 18:23

developer   ~0005645

Current "best practice" is to omit that tag, because it prevents anything being put into the HTML that is not intended ( extra new lines, extra spaces, etc. ).

On the other hand, I just noted it as something to consider. I did not make this change.


2018-12-03 20:53

administrator   ~0005696

Brian, when trying to merge your changes into the test branch I ran into troubles with the "require_once( "general.php" );" in www/index.php which I still do not understand.

First of all, the path does not look right when compared to the other require_once statements, but even with the path a "not found" error is reported.

Why did you add this line? Other files seem to include require_once("../includes/lib/general.php") or require_once("../includes/mysql.php"), general.php from include seems only to be used by files which are currently not active in the web page...


2018-12-03 21:36

developer   ~0005697

I'm sorry, Ted. That was added for testing, and I forgot to remove it afterwards. Done now. general.php is in includes and includes/lib.


2021-12-29 21:04

reporter   ~0006089

How can I test that?


2022-01-05 01:07

developer   ~0006091

Test procedure for this should be:

Edit php.ini and set "short_open_tag = Off"

Attempt to run the code. If there are any short tags "<?" remaining, they will appear as errors.

The abbreviation "<?=" will still be allowed, so if you want to test for ( and eliminate ) those, it will require a grep or other text search.

Issue History

Date Modified Username Field Change
2018-10-29 20:18 bdmc New Issue
2018-10-29 20:18 bdmc Assigned To => bdmc
2018-10-29 22:21 Ted Relationship added child of 0001260
2018-10-30 04:59 bdmc Note Added: 0005621
2018-10-30 05:00 bdmc Note Added: 0005622
2018-11-02 18:05 bdmc Note Edited: 0005621
2018-11-02 18:07 bdmc Status new => solved?
2018-11-02 18:07 bdmc Description Updated
2018-11-02 18:07 bdmc Note Added: 0005641
2018-11-02 18:09 bdmc Note Added: 0005642
2018-11-02 18:10 bdmc Note Added: 0005643
2018-11-02 18:11 bdmc Status solved? => needs review & testing
2018-11-02 18:16 GuKKDevel Note Added: 0005644
2018-11-02 18:23 bdmc Note Added: 0005645
2018-12-03 20:53 Ted Note Added: 0005696
2018-12-03 21:36 bdmc Note Added: 0005697
2021-12-29 21:04 L10N Note Added: 0006089
2022-01-05 01:07 bdmc Note Added: 0006091