View Issue Details

IDProjectCategoryView StatusLast Update
0001444Main CAcert Websitesource codepublic2018-12-03 21:36
ReporterbdmcAssigned Tobdmc 
PrioritynormalSeveritymajorReproducibilityalways
Status needs review & testingResolutionopen 
PlatformDefaultOSanyOS Versionany
Product Version 
Target Version2017 Q4Fixed in Version 
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

Relationships

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

Activities

bdmc

2018-10-30 04:59

developer   ~0005621

Last edited: 2018-11-02 18:05

View 2 revisions

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.

bdmc

2018-10-30 05:00

developer   ~0005622

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

bdmc

2018-11-02 18:07

developer   ~0005641

This code is now available for testing.

bdmc

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."

bdmc

2018-11-02 18:10

developer   ~0005643

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

GuKKDevel

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.

bdmc

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.

Ted

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...

bdmc

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.

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 View Revisions
2018-11-02 18:07 bdmc Status new => solved?
2018-11-02 18:07 bdmc Description Updated View Revisions
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