Hallo,
my question is why in RC the display (logging) of Notice-Warnings are disabled. Okey, Notices are often nothing important, but sometimes they show some rare problematic cases, which are not an error but a program-failure. For example: I got those Notices:
[18-Aug-2008 15:23:54] PHP Notice: Undefined offset: 1 in /var/www/web231/files/site1/webmail/lib/imap.inc on line 630 [18-Aug-2008 15:23:54] PHP Notice: Undefined index: in /var/www/web231/files/site1/webmail/lib/imap.inc on line 631 [18-Aug-2008 15:23:54] PHP Notice: Undefined offset: 2 in /var/www/web231/files/site1/webmail/lib/imap.inc on line 633 [18-Aug-2008 15:23:54] PHP Notice: Undefined offset: 3 in /var/www/web231/files/site1/webmail/lib/imap.inc on line 634 [18-Aug-2008 15:23:54] PHP Notice: Undefined offset: 4 in /var/www/web231/files/site1/webmail/lib/imap.inc on line 635 [18-Aug-2008 15:23:54] PHP Notice: Undefined offset: 1 in /var/www/web231/files/site1/webmail/lib/imap.inc on line 639 [18-Aug-2008 15:23:54] PHP Notice: Undefined offset: 2 in /var/www/web231/files/site1/webmail/lib/imap.inc on line 640
I have to say, that i use RC-0.1 stable. This warning are from the Function "iil_StrToTime" and all undefined offsets point to the variable $a. Since this notice is logged in a working environment (so this happen to some of the user, who used RC) i can't reproduce the problem. But there must be a case where the Time-String is not right so this function does work right on it. When does it happen?
I had several other problematic cases which i could repair by myself, so my suggestion is to enable also the Notice-Warnings. What do you think about this? _______________________________________________ List info: http://lists.roundcube.net/dev/
Making RoundCube notice-free would require us to change hundreds of line of code including 3rd party libs. PHP will grumble on every access to a uninitialized var and when testing for an undefined array index.
To reduce programming code (and effort!) to a minimum, it's better to mute notices. Real problems are still reported as warning or error.
~Thomas
Eduard Krieger wrote:
Hallo,
my question is why in RC the display (logging) of Notice-Warnings are disabled. Okey, Notices are often nothing important, but sometimes they show some rare problematic cases, which are not an error but a program-failure. For example: I got those Notices:
[18-Aug-2008 15:23:54] PHP Notice: Undefined offset: 1 in /var/www/web231/files/site1/webmail/lib/imap.inc on line 630 [...]
I have to say, that i use RC-0.1 stable. This warning are from the Function "iil_StrToTime" and all undefined offsets point to the variable $a. Since this notice is logged in a working environment (so this happen to some of the user, who used RC) i can't reproduce the problem. But there must be a case where the Time-String is not right so this function does work right on it. When does it happen?
I had several other problematic cases which i could repair by myself, so my suggestion is to enable also the Notice-Warnings. What do you think about this? _______________________________________________ List info: http://lists.roundcube.net/dev/
List info: http://lists.roundcube.net/dev/
Thomas Bruederli schrieb:
Making RoundCube notice-free would require us to change hundreds of line of code including 3rd party libs. PHP will grumble on every access to a uninitialized var and when testing for an undefined array index.
To reduce programming code (and effort!) to a minimum, it's better to mute notices. Real problems are still reported as warning or error.
I know why there is an option to control the logging output :) . But still this is a bad coding style to ignore even just notices. And like i wrote before in rare cases a notice is a result of an (semantic) programming-error before. Since in most cases one must just add a "isset($X)" i think this is not so big problem. If this is too much (too annoying, useless) for you main coder to do i can do this. _______________________________________________ List info: http://lists.roundcube.net/dev/
We have had this same discussion a while ago - please search the
archives. Making apps notice-free in PHP is a pain and not worth the
time -the developers should focus on new features instead of esoteric
fixes that don't add a benefit. Except that the code blows up and
becomes unreadable.
So don't waste your time "fixing" this and focus on outstanding
features. PHP does not require Java style coding, so don't enforce it.
lg, Mike
Michael Baierl schrieb:
We have had this same discussion a while ago - please search the
archives.
Don't know this. Thanks for point this out. I will just post failure if i found some here (open ticket).
Eduard _______________________________________________ List info: http://lists.roundcube.net/dev/