#154 - Rewrite to strict PHP code
Type Enhancement
Status Closed
Milestone 2.1
Version -
Component Core
Priority Normal
Severity Normal
Owner bckp
Assigned to Jack
Reported 12 years ago
Updated 8 years ago
Votes 0
Related tickets
Proposed time
Worked time

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 :)

Ticket History

12 years and 4 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.

12 years and 4 months ago by Jack

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

12 years and 4 months ago by Pierre

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

<?php ini_set('error_reporting', 'off'); error_reporting(0); ?>

12 years and 4 months ago by Jack

  • Milestone 2.2 2.1