#154 - Rewrite to strict PHP code

Description

Your PHP code have many strict errors, instead of code if($array['val']) you should write if(isset($array['val'])

when you creating object, you should create it like this $obj = new stdClass();

If you wish, i can help you with this, every time i download new version of Traq, i rewrite a part of it :)

Activity

15 years and 7 months ago by Rodney

  • Milestone 2.0 2.2
  • Closed ticket as Closed

I did some searching with I had scripts gives me errors about unset variables, undefined indexes, etc. I found that most people run PHP with these turned off/hidden.

I do not see the point in making the author rewrite/add more lines of code to fix something that only a few people will see, and is also easily fixed by turning such errors off.

And from my understanding, it's also wise to run PHP with errors turned off on a production server.

15 years and 7 months ago by Jack

I receive no errors with error_reporting set to "E_ALL & ~E_NOTICE | E_STRICT".

15 years and 7 months ago by Pierre

Not a very ideal solution, but in the index file set the following to remove all warnings/errors:

15 years and 7 months ago by Jack

  • Milestone 2.2 2.1

Status

Closed
Jack
Normal

Details

Enhancement
2.1
Core
-
Normal

Tracking

bckp
15 years and 7 months ago
11 years and 11 months ago
0
-
-