Running phpWCMS on a PHP configuration that reports all errors (E_ALL) reveals that there are quite some noticess and warnings floating around. Especially non-initialized arrays indices and 'sloppy' variable initialization checks (à la "if($var)" in stead of "if(isset($var))") seem to be omnipresent.
Perhaps this way of coding is intentional? (less memory allocation?) Would it be a good suggestion to start a branch of phpWCMS that is completely notice and error free? (in the "reporting" sense of the word, obviously) The errors and notices are not there for nothing and removing them should increase the quality of this excellent CMS.
Hopefully I haven't insulted anyone with this post, it's just that it struck me, that's all.
Errors and notices
- Oliver Georgi
- Site Admin
- Posts: 9919
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
I have begun to remove such notices - but this goes step by step and is no "real" problem.
and the correct check is:
"if($var)" is the shortest version to check if $var is NOT false or empty (and isset).
Oliver
and the correct check is:
Code: Select all
if(isset($var) && $var) {...
Oliver
- Oliver Georgi
- Site Admin
- Posts: 9919
- Joined: Fri 3. Oct 2003, 22:22
- Contact: